StarterWare CPSW
来源:互联网 发布:今日非农数据 编辑:程序博客网 时间:2024/06/01 10:19
Introduction
The peripheral is compliant to IEEE 802.3 standard, describing the Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Access Method and Physical Layer specifications. CPSW has one host port and two slave ports, each of which are capable of 10/100/1000 Mbps with MII/GMII/RGMII interfaces. The CPSW also has an Address Lookup Engine which processes all received packets to determine which port(s) if any that the packet should the forwarded to. The ALE uses the incoming packet received port number, destination address, source address, length/type, and VLAN information to determine how the packet should be forwarded. The CPSW incorporates an 8kB internal RAM to hold CPDMA buffer descriptors (also known as CPPI RAM). The MDIO module implements the 802.3 serial management interface to interrogate and control up to 32 Ethernet PHYs connected to the device by using a shared two-wire bus. The application shall use the MDIO module to configure the auto negotiation parameters of each PHY attached to the CPSW slave ports, retrieve the negotiation results, and configure required parameters in the CPSW module for correct operation.
The APIs for configuring and using CPSW, MDIO and generic PHYs are exported in /include/cpsw.h, /include/mdio.h and /include/phy.h respectively.
Programming Sequence
- Give proper settings for enabling CPSW interface at the chip configuration module.
- Enable the pin multiplexing for CPSW by invoking the API ‘CPSWPinMuxSetup()’
- According to the EVM settings, determine the MII transfer mode and enable the interface. In case of RGMII, ‘EVMPortRGMIIModeSelect()’ can be used to enable RGMII mode in the chip configuration
- Reset the CPSW hardware. Each submodule can be reset by calling the APIs ‘CPSWSSReset()’, ‘CPSWCPDMAReset()’ and ‘ CPSWWrReset()’.
- Initialize the MDIO Module using ‘MDIOInit()’. Enough delay shall be given to ensure the successful completion of the MDIO module initialization before any further access to MDIO.
- Initialize the ALE logic and clear the entries in the ALE table using ’CPSWALEInit()’
- Set the port states for each port used inside the ALE by invoking ‘CPSWALEPortStateSet()’
- Set the ALE table entries for unicast/multicast with the required Ethernet address (MAC address). The MAC address can be read by invoking the API ‘EVMMACAddrGet()’
- If port statistics need to be enabled, enable using ‘CPSWStatisticsEnable()’
- Initialize and configure the slave ports
- Reset the sliver logic (which correspond to slave port), by invoking the API ‘CPSWSlReset()’
- Set the MAC address for the slave ports using ‘CPSWPortSrcAddrSet()’
- Auto negotiate with the PHY device connected through the MDIO, if the phy is alive. Respective PHY Auto negotiation API can be used for this.
- According to the Auto negotiation results from the PHY, set the GMII/MII/RGMII mode and the duplex of transmission for CPSW using ‘CPSWSlTransferModeSet()’.
- Initialize the TX and RX buffer descriptors in the CPPI RAM, which is local to the CPSW.
- Enable the transmission and reception at CPDMA using ‘CPSWCPDMATxEnable()’ and CPSWCPDMARxEnable()’
- Enable the GMII/RGMII interface at CPSW by invoking ‘CPSWSlRGMIIEnable()’ for all the slave ports to be used
- Enable interrupt generation.
- Enable the transmission/reception interrupt generation at CPDMA using ’CPSWCPDMATxIntEnable()’ and ‘ CPSWCPDMARxIntEnable()’
- Enable the transmission/reception interrupt generation at CPSW wrapper module for the required core using ‘CPSWWrCoreIntEnable()’
- In the receive interrupt handler, the buffer descriptors associated with a received packet can be found using the SOP(Start Of Packet)/EOP(End Of Packet) fields of the buffer descriptor. After the packet is processed, the completion pointer shall be written using ‘CPSWCPDMARxCPWrite()’ to acknowledge the CPDMA. After the receive interrupt handler processes all the received packets, the CPSW shall acknowledge the end of interrupt processing with ‘CPSWCPDMAEndOfIntVectorWrite()’.
- In the transmit interrupt handler, the buffer descriptors associated with a transmitted packets shall be freed by writing, the completion pointer shall be written using ‘CPSWCPDMATxCPWrite()’ . After the transmit interrupt handler processes all the transmitted packets, the CPSW shall acknowledge the end of interrupt processing with ‘CPSWCPDMAEndOfIntVectorWrite()’.
整个,网络mac层的初始化,发送接收过程。
- StarterWare CPSW
- StarterWare CPSW Port lwIP
- CPSW program sequence
- AM335X StarterWare Environment Setup
- StarterWare Ethernet Design
- StarterWare 02.00.00.06 User Guide
- StarterWare学习之编译移植UART例程
- CCS架构与starterware SDK结构解析
- 我的BeagleBone学习历程 ---StarterWare裸奔
- 以cpsw为例学习linux设备树
- 杂记:Cortex™-A8 am335x cpsw (一)
- 关于StarterWare(AM3359) HSI2C总线的系统编程
- 关于StarterWare(AM3359) MMCSD驱动的系统编程
- AM335X StarterWare 自带bootloader对IRQ的处理
- AM335x运用starterware裸机运行环境搭建连接到traget
- Starterware On Beaglebone Black(一) 环境搭建
- C6000 EMAC、Cortex A8 CPSW等EtherCAT主站驱动程序开发总结
- TI: 以cpsw为例学习设备树(内核如何调用这些参数)
- SDWebImage使用,图片加载和缓存
- 关于dpkg:处理 xxx (--configure)时出错(转)
- SQL的优化原则
- XCODE4.x添加FrameWork
- vim 命令(全)
- StarterWare CPSW
- VC程序提升管理员权限
- 架构之美-第16章-数据增长:FACEBOOK平台架构(5)
- Android 解锁屏启动过程
- Excel合并后的单元格,每个都有内容(转帖+亲自实践)
- ANDROID音频系统散记之四:4.0音频系统HAL初探
- [笔记] find -exec -ok 的用法
- javax.xml.bind.UnmarshalException (uri:"", 解决办法
- libxml -- 解析 XML 文档