Software Operation of Gigabit Ethernet Media Access Controller on TMS320C645x DSP
The TMS645x devices provide an efficient interface between the DSP core processor and the network via a high performance Gigabit Ethernet Media Access Controller (EMAC), supporting four Media Independent Interfaces to the physical layer device (PHY).
This application report discusses the software interface used to operate the EMAC and Management Data Input/Output (MDIO) modules. It describes in detail how to initialize and maintain Ethernet operation in a software application or device driver. Special attention is paid to configuring features new to Gigabit EMAC, and to initializing each of the four Media Independent Interfaces.
There are many different approaches in structuring an Ethernet software application or device driver. This application report is not intended as the only possible methodology; it is rather an example driver, with several example applications that show how to use this driver’s APIs, and it is useful to rapidly test and benchmark the EMAC on C645x devices.
This application report and the code that comes with it is not related to the C6000 TCP/IP Stack, although it parallels the HAL driver in the stack software. The example driver described here serves two main purposes:
- Provides a quick hardware check, to verify that the EMAC and its connection to the board and the PHY operates correctly. This is especially useful for customers who spin their own board, and need a way to check the EMAC/PHY hook-up. A customer would use this code to check that that hardware operates properly before attempting to run a full TCP/IP Stack.
- As example/benchmarking code for the Ethernet MAC, is intended to show how to program and benchmark the peripheral. Customers that do not want to use a full stack, but just need to send packets with a layer 2 driver, or are implementing their own TCP/IP stack driver, and need to know how to program C645x EMAC, would benefit from having an easily available, complete Ethernet driver. The code is also useful to benchmark the peripheral by itself, without the overhead of a TCP/IP Stack.
- Further, this driver shows how to implement features of the EMAC that are not supported in the C6000 TCP/IP Stack HAL driver, like using more than one transmit channel.
Please disable any pop-up blockers for proper viewing of this Whitepaper.