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 without FreeRTOS example problem



Hi,

I created a new project without use of the FreeRTOS with the HCG, then copy the example and the lwip1.3.2 folder of the EMAC example project on the WIKI page. The main function just call the EMAC_LwIP_Main function.The EMAC Address and the PHY address setted in the HCG are just the same with example project,but the board seems cannot connect through the Ethernet.

The Dp83640IDGet function cannot get the right value when debug. The programe stops at the MDIOPhyRegWrite function (where it notes that/* wait for command completion*/ ) called by the Dp83640IDGet(*,*); The MDIO_USERACCESS0 pointer's value is not correct compared to the right version of the link below:

The functions parameters are just the same with the right version programe, I wonder why the pointer MDIO_USERACCESS0's value is different.Do I forget something to set?

The attach is the project,I wish it can be useful.The board I use is the TMS570LS31HDK, I do not use the sci functions in the project.

Hope you to help me to find out the reason to realize the EMAC function.

Thanks

yong

7651.timer.rar

  • Hello Yong,

    I have forwarded your questions to one of our EMAC experts. They should get back to you soon.

  • Hi Yong,

    Ethernet pins are muxted with other function. Please un-comment the following functions call, and try again.

    //iommUnlock();

    //iommMuxEnableMdio();

    //iommMuxEnableMii();

    //iommLock();

    Regards,

    QJ

  • Hi,QJ

    Thanks for replying. What you said works!

    There is also problem coming, The Init seems ok and when I send the first UDP packet from PC(192.168.1.15) to the HDK board(192.168.1.165),it indeed has a reponse(The PC receive the reponse packet from the HDK board),but when you send a second one, the HDK board has no reponses any more(the third or the forth...).

    I use the wireshark to capturing the packet which find that when send the first, the PC send a ARP packet to quest the HDK board's address(who has 192.168.1.165(HDK' IP) tell 192.168.1.15(PC's IP)),and the HDK board reponse a ARP packet. Then the PC send the UDP data packet and the HDK board reponse with a UDP packet.

    While, the sencond time, the PC just send a UDP data packet without sending the ARP first.

    Where might be wrong and how to fix that?

    Regards,
    yong

  • Hi,

    I tried to send some packets from the HDK board at the beginning, and the PC can receive successfully.But when the HDK board receive the first packet from the PC, it seems some pointers has wrong number which led to a dabort error when I send packet again after receive.

    I have not change the lwip deeper functions so I think it might be something I set cause that error,Can you help me  find it ?

    Regards,

    yong

  • I've made it ,it's just because of the wrong using of the udp_recv function.

    Thanks for your help!

    Regards,

    yong