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.

Correct Hardware/Software set-up to interpret example_EMAC_Loopback_TxRx from HalCoGen?Hai

Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

Hello All,


I'm using TMS570LC4357. I want to realise ethernet communication in this Micro controller. For that I have used the example code frm HalCoGen.

(C:\ti1\Hercules\HALCoGen\v04.02.00\examples\TMS570LC43x\example_EMAC_Loopback_TxRx.c).

I have burned the .out file to the controller. My question is that all I did are explained in the HalCoGen help file. But how  can I confirm my Micro controller works correctly or ethernet communication is happened well or the frames what I expects to send are transmitted through the ethernet part.?

So what is the arrangement I should have to see the frame so that I can confirm "OK, my IC is working well.".?


Please anybody answer this.

Regards,

 Karthikeyan.K

  • Hello Karthikeyan,

    Have a look at this page and let me know if you still have any questions.

    processors.wiki.ti.com/.../HALCoGen_Ethernet_Driver_and_lwIP_Integration_Demonstration
  • Hello Chuck,

    Thanks for your reply.

    I've read that page you refer. But the example given is using lwIP with EMAC module.

    My requirement is very simple.

    Preamble(7 Bytes) : SFD(1 Byte) : Destination(6 Bytes) : Source(6 Bytes) : Length(2Bytes) : Data(46 Bytes to 1500 Bytes) : FCS(4 Bytes)
    I've to use this ethernet frame format directly.

    i.e:
    I want my TMS570LC4357 to send an ethernet frame directly to my host computer. And I want to see whether the frame is coming or not.
    (I can code there like if "this" frame comes, do "this". So I will code my TMS570 to send different frames at different times.)

    HalCoGen Example actually do the same I think. So I want to confirm that the frame is coming from the controller. But how to do that?

    If suppose UART/SCI, then we will have hyper terminal window to see the UART/SCI frames coming from TMS570.
    But in the case of Ethernet, what can I do?

    How to transfer just ethernet frames from TMS570 to PC & also vice versa case?

    By now, I want to send ethernet frame from TMS570 with Destination Address as Host PC's MAC Address, and also I want to read the incoming ethernet frame (which is sent by TMS570) from PC.

    So Please guide me how to do this.

    Any how, the link that you gave was useful for me.

    Thanks Chuck.

    Expecting your guidance.

    Regards,
    Karthikeyan.K
  • Hello Karthikeyan,

    I am glad that the link was somewhat helpful. For the specific answer you are looking for, I am forwarding your post to one of our EMAC experts so that they can provide more detailed guidance. They should reply to you soon.
  • Hi Karthikeyan,

    The EMAC example in HALCoGen is actually a loopback test. So, to check if packets have been received, you can look at the network statistics registers on the device and see that the number of received packets are the same as the number of transmitted packets. Apart from this, you can also check the value of each packet, but since there are too many of them, this is more of a  sanity check to verify if ethernet is functioning properly.

    Coming to your use case. What you could do is to connect the board and your PC and send broadcast packets(first byte 0xFF..) and verify if data is being received using a network analyzer tool such as wireshark. I'm not entirely sure if this will work since in this case the board doesn't have an IP address and is not identifiable on a network as such, but it's worth a try.

    The other option is to use the lwIP demo and configure your board and the PC to be on the same subnet(change IP address of both to static) and then send data. Wireshark will detect this and you can observe data coming in. But as you said, you need to use raw ethernet packet, so I'm not sure if this meets your requirement.

    You could try out both options. Let me know what happens.

    Hope this helps.

    Thanks and Regards,

    Chaitanya

  • Hello Chaitanya,

    I also did the same analysis before asking in forum and No frame was detected even for lwIP Demo Code when I connect my TMS570 HDK board directly to my Host PC's on ethernet port and at that time TMS570 prints "ERROR INITIALISING HARDWARE" in hyper terminal window. (If I connect my board with LAN Router, at that time only lwIP Decmo code prints it's ip address in the hyper terminal). But at both the cases, wireshark doesn't show the frame from TMS570.

    However I really do not want lwIP. Just raw ethernet frame alone I want to send from TMS570 to PC and vice versa. Is there any application note for emac peripheral in TMS570LC4357? Please give me a link if any.

    And Please guide me to complete this task so that I can really have in-depth knowledge of working of EMAC module & Ethernet Protocol .

    Expecting your guidance.

    Thanks and regards,
    Karthikeyan.K