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.

EMAC example

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am developing the project with TMS570LS3137 MCU. Part of this project is communication over Ethernet. can any body suggest me how to start for that ? Does anyone has a example project or a driver for TMS570LS3137 MCU?

  • And how can i generate code using HALCoGen? ( I tried enabling only EMAC driver. And it asked me for the EMAC address in EMAC configuration? How to proceed there?? )

  • Hi, there.

    As of today, HALCoGen does not support the EMAC module. I am attaching a CCS3.3 EMAC testcase where you can can see how EMAC is setup to send and receive messages.  3201.EMAC_loopback.zip

    The test executes from RAM. EMAC is configured in an internal loopback mode. You can also change one line in main() function to use external loopback via the PHY. If you choose external loopback, you will need to set up PINMUX registers for EMAC functions.

    Once you unzip the file, you can find the CCS project in the subdirectory of "\EMAC_loopback\platform_verif\devices\GLADIATOR\R4\EMAC1\EMAC\EMAC07_loopback_debug". Please let me if it would help.

    Thanks and regards,

    Zhaohong

  • Subramanya,

    Starting HALCoGen 3.00.01 release, we have added EMAC driver support. This contains the EMAC & MDIO Drivers. HALCoGen GUI allows you to define the MAC Address and the PHY address for use in MDIO. Based on your network stack you will have to call the appropriate EMAC/MDIO APIs. Since the Ethernet PHY is external, you will have to create the PHY drivers first. 

    We have are planning to release a demonstration of EMAC Driver & lwIP Integration soon. Details will be available at this link:http://processors.wiki.ti.com/index.php/HALCoGen_Ethernet_Driver_and_lwIP_Integration_Demonstration

    Regards,

    Pramod

  • Thanks Pramod and Zhaohong Zhang for replying.
    @ Pramod: I was going through the programming sequence using HALCoGen Generated drivers in the link you mentioned. There is a procedure to operate EMAC modules which says,"Using HALCoGen enable the PINMUX for EMAC & MDIO. Generate the code for HAL & system initialization. " But in PINMUX, i couldn't find any EMAC or MDIO.

    Where can i initialize them? And is the MAC address user defined?

    It would be great if you could pass me on any sample demo project built through HALCoGen.

    @Zhaohong Zhang: I'm using CCS v5, and actually i didn find any project in the zip file. But i created a new project  and added all those files and tried to run it. But it didn't work. It neither gave any errors nor the output. Please let me know if i need to make any modifications before running it.

  • Subramanya,

    The external PHY is connected vial RMII/MII. Depending on your board design, you will have to select RMII/MII on the PINMUX tab. (eg., HDK uses MII to connect to external PHY).  Apart from this you will have to enable the MDIO PinMux on G3 (in pinmux tab).

    Regards,

    Pramod

  • You should see a CCS3.3 project file "EMAC07_loopback_debug_R4.pjt" in the subdirectory EMAC_loopback\platform_verif\devices\GLADIATOR\R4\EMAC1\EMAC\EMAC07_loopback_debug". There should be utility in CCS5 to convert this project to CCS5 project.

    Zhaohong

  • Hi, there.

    I am closing this thread because there is no request for more than two weeks.

    Thanks and regards,

    Zhaohong