This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: tcpEcho, PHY configuration using MDIO

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi,

I am trying to port the tcpEcho example to custom hardware.  My problem is that I need to modify registers in the PHY using MDIO but have been unable to find an appropriate place to insert my code.  In non sys/bios (and non NDK) applications such as the enet_lwip example I would use Ethernet_writePHYRegister() and Ethernet_readPHYRegister() to configure the PHY prior to its use.  There are also some hardware configurations (using GPIO) that need to happen before the physical media is accessible.  So, where do I place this initialization code?

Thanks, Jbec

  • Hi Jbec,

    For the GPIO configuration changes, you would have to edit the cm_common_config_c28x project run on C28x CPU which does the work of initializing the CM and also allocating the GPIOs to peripherals. <C2000Ware>\driverlib\f2838x\examples\c28x\cm_common_config_c28x.

    For the ndk stack as well all the LLD api's of Ethernet are available but with different prefix EMACF2838XLLD instead of Ethernet. EMACF2838XLLD_readPHYRegister(), EMACF2838XLLD_writePHYRegister() can be used to configure the phy.  The LLD definitions can be found at ndk_f2838x_3_61_01_01\source\ti\ndk\drivers\f2838x\.

    You can use these function after the ndk stack initialization in ndk_tirtos.c of the project.

    Regards,

    Yashwant