Hardware
3.4
VIA VT6510B Ethernet Switch
The SPT711xPFCE has an on-board 10 port (2 × MII, 8 × RMII) Ethernet switch connected to both CMC
sites and all four DSP devices. The Ethernet switch is a VIA VT6510B (http://www.vntek.com).
Example 1 provides basic initialization code for the switch through a host controller connected to the
CPLD host interface and using the memory map described in Section 6 , CPLD Memory Map, on page 24.
Code Listing 1. VIA Switch Initialization Code
/***************************************************************************
* PFC Ethernet Switch Initialization Routines
*
***************************************************************************/
void writeSwitchReg(unsigned int _addr, unsigned char _data)
{
*pdk_bd_regs.u711xpfc.sw_addr_l = (unsigned short)(_addr%256);
*pdk_bd_regs.u711xpfc.sw_addr_h = (unsigned short)(_addr/256);
*pdk_bd_regs.u711xpfc.sw_reg_data = (unsigned short)(_data);
pdk_waste_clks_10(1000);
}
unsigned char readSwitchReg(unsigned int _addr)
{
unsigned char readData = 0;
*pdk_bd_regs.u711xpfc.sw_addr_l = (unsigned short)(_addr%256);
*pdk_bd_regs.u711xpfc.sw_addr_h = (unsigned short)(_addr/256);
readData = (unsigned char) *pdk_bd_regs.u711xpfc.sw_reg_data;
pdk_waste_clks_10(1000);
return readData;
}
void enableSwitchPhyAutoPolling()
{
while ((readSwitchReg(0x0405) & 1) != 0);
writeSwitchReg(0x0404, 0x08); // Enable Auto Polling;
while ((readSwitchReg(0x0405) & 1) != 0);
}
void disableSwitchPhyAutoPolling()
{
while ((readSwitchReg(0x0405) & 1) != 0);
writeSwitchReg(0x0404, 0x04); // Disable Auto Polling;
while ((readSwitchReg(0x0405) & 1) != 0);
}
// _addr = {4-bit-port-num, 3’b000, 5-bit-reg-num}
void writeSwitchPhy(unsigned short _addr, unsigned short _data)
{
// Note - Autopolling mode must be disabled
while ((readSwitchReg(0x0405) & 1) != 0);
writeSwitchReg(0x0400, (unsigned char)((_addr >> 8) & 0x000f));
writeSwitchReg(0x0401, (unsigned char)(_addr & 0x1f));
writeSwitchReg(0x0402, (unsigned char)(_data%256));
writeSwitchReg(0x0403, (unsigned char)(_data/256));
writeSwitchReg(0x0404, 0x01); // Write to Phy;
MSC711x Packet Telephony Farm Card (SPT711xPFCE), Rev. 1
Freescale Semiconductor
13
相关PDF资料
SPUSB1AJT SURGE SUPPRESOR USB 12OHM SC70-6
SR-5H-6.3A-BK FUSE 6.3A 250VAC RADIAL SLOW
SR1K20M155X VARISTOR 20VRMS W/RFI SUPP RAD
SRP120LF POLYSWITCH PTC RESET 1.2A STRAP
SRP120SF POLYSWITCH PTC RESET 1.2A STRAP
SRP175F POLYSWITCH STRAP 1.75A HOLD
SRP200F POLYSWITCH STRAP 2.00A HOLD
SRP350F POLYSWITCH STRAP 3.50A HOLD
相关代理商/技术参数
SPT-750 功能描述:烙铁 CONTROL BOX ASSEM SP-750T RoHS:否 制造商:Weller 产品:Soldering Stations 类型:Digital, Iron, Stand, Cleaner 瓦特:50 W 最大温度:+ 850 F 电缆类型:US Cord Included
SPT-751 功能描述:烙铁 COVER ASSEMBLY SP-750T RoHS:否 制造商:Weller 产品:Soldering Stations 类型:Digital, Iron, Stand, Cleaner 瓦特:50 W 最大温度:+ 850 F 电缆类型:US Cord Included
SPT7560 制造商:Cooper Wiring Devices 功能描述:
SPT7572 制造商:Cooper Wiring Devices 功能描述:
SPT7610 制造商:CADEKA 制造商全称:CADEKA 功能描述:6-BIT, 1 GSPS FLASH A/D CONVERTER
SPT7610SIQ 制造商:FAIRCHILD 制造商全称:Fairchild Semiconductor 功能描述:6-BIT, 1 GSPS FLASH A/D CONVERTER
SPT7710 制造商:FAIRCHILD 制造商全称:Fairchild Semiconductor 功能描述:8-BIT, 150 MSPS, FLASH A/D CONVERTER
SPT7710AIG 制造商:CADEKA 制造商全称:CADEKA 功能描述:8-BIT, 150 MSPS, FLASH A/D CONVERTER