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.

Unable to get HALCoGen EMAC with lwIP Demo v3 working

Other Parts Discussed in Thread: HALCOGEN, RM46L852

I am trying to get the demo here http://processors.wiki.ti.com/index.php/HALCoGen_Ethernet_Driver_and_lwIP_Integration_Demonstration to work with my RM46 HDK. I tried unsuccessfully to get version 3 to work but when I tried version 2 it worked just fine. I then tried to integrate the demo into my own project but found that version 2's lwIP implementation doesn't seem to be compatible with HALCoGen v4.01's emac files. I was able to successfully integrate v3's lwip code & get it compiling\linking but I am having the same issue the demo is having. 

What is happening is that whenever the program reaches this function

    ipAddr = lwIPInit(0, macAddress, 0, 0, 0, IPADDR_USE_DHCP);

the system just waits until I get a

-------- ERROR INITIALIZING HARDWARE --------

error in the terminal. 

again, this works with version 2 of the demo so i know my setup it working but i need to get version 3 working so i can use it to integrate lwIP into my program. Any help anyone can provide would be much appreciated :-)

 

edit: I am using CCS 5.4, HALCoGen v4.01, & nowFlash v3.42.3

  • So even when I program the HDK with the .out files that come with each version of the demo only version 2 works. So I guess what i'm asking is if anyone here has gotten version 3 to work with the RM46 HDK?  If so did it work out of the box for you or did you have to change something to get it to work? 

    Edit: Oddly enough I tried flashing the version 3 .out built for the RM48 and that one works. 0.o Now i'm trying to figure out what is different between the RM46 build and the RM48 build and maybe that'll help me get it working. 

    Edit2: So, I changed the target processor for the Build-RM48 project to RM46L852 and built/programmed that and that is working. Considering there is no code difference between the Build-RM46 & Build-RM48 projects (they use the same folders) that makes me think there is some difference in the HALCoGen driver configuration between the two projects. Anyone know how the Build-RM48 HALCoGen project is configured differently than the Build-RM46 HALCoGen project? 

  • So, I loaded up both the Build-RM46 & Build-RM48 HALCoGen projects and compared the differences tab by tab and changed the Build-RM46 HALCoGen configuration to match the RM48 configuration and now it works!

    It turns out the Build-RM46 HALCoGen project is configured to use RMII and not MII on the PINMUX tab. I changed it to use MII. Also, on the GCM tab the Build-RM46 HALCoGen project had a VCLKA4 divider of 2 which made  VCLKA4_DIVR_EMAC 40 where as the RM48 project had a divider of 1 and which made VCLKA4 have a value of 80. This is actually different than what the suggested configuration in this subsection of the lwIP guide:  http://processors.wiki.ti.com/index.php/HALCoGen_Ethernet_Driver_and_lwIP_Integration_Demonstration#Configuring_EMAC_and_MDIO_using_HALCoGen_GUI

    After making those changes it is now working. :-)

    To summarize how to fix this issue. Open the Build-RM46 HALCoGen project and on the PINMUX tab uncheck RMII and check MII. Then on the RM46L852ZWT -> GCM tab change VCLKA4 Divider to 1 and verify that VCLKA4_DIVR_EMAC changes to 80. I hope this helps anyone else in the future that may have the same issue

  • Josiah,

    Thanks for pointing this out. While it should've been MII, I don't know if it counts as a bug, since I remember RMII worked for me on my HDK. I'll try it out again to see if maybe the clock settings affect it. Also, I suggest making the VCLKA4 divider value 2. It should still run fine at 40 MHz with MII enabled.

    We'll fix this and release an update so others don't have this issue out of the box. Again, thanks a lot for pointing this out.

    Regards,

    Chaitanya