SPRUII0F May 2019 – June 2024 TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S
FILE: ethernet_ex3_threshold_mode_phy_loopback.c
This example demonstrates the steps to be followed in using the Ethernet of the Communication Manager Subsystem to initialize the Ethernet module in Threshold mode It Configures the module in MII External Loop back mode in which the packet is looped back at external PHY. Prepares a packet to be sent, Sends the packet and reads the staticstics to check if the packet is received by the module It configures the Transmit and Receive queues of Ethernet DMA in Threshold mode. The Transmit threshold mode generates early transmit interrupts when each buffer is transmitted from the memory into the transmit FIFO. The Buffer can be reclaimed by the application. The Receive threshold mode generates early receive interrupts where the module generates Early receive interrupts when programmed threshold buffer size is transferred into receive buffer memory from the receive FIFO. This will be of use when dealing with Time critical receive paths where the application can consume the packets at programmed burstLength unlike the conventional Store and Forward mode(Default) where the module generates the interrupts when the complete packet is transmitted on the Line and when the complete packet is received and checksum validation is succesful This example provides a starting point for configuring the threshold mode. Refer to the Driver API guide for the different callbacks available in the driver. It uses the example Interrupt Service Routines provided in the driver library. Users can modify those ISRs or write another as per their need. Before running this Communication Manager code the C28x cpu1 code has to be run to configure the clocks to Communication manager and required IO pads for Ethernet module
External Connections
This example programs the Ethernet module in External Loop back mode (at PHY) and hence needs external connection to the PHY on the MII interface and also the MDIO Pins connected to the PHY. This example assumes DP83822 PHY for the PHY configurations if a different PHY is used the sequences might change. Refer to the C28x CPU1 code of ethernet_config_c28x project for which GPIOs are used for connecting to the PHY
Watch Variables