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.

RTOS/AM5728: DSP directed message

Part Number: AM5728

Tool/software: TI-RTOS

Hi,

I modified the EMAC_BasicExample_evmAM572x to send messages instead of doing a local loopback. That worked fine. Now I wanted to use the second interface to send on another network. I got it running, but I can't select on which port the packages are sent. Per default the packages just get sent on both ports. I tried to set the port in the package description flags like this:

p_pkt_desc->Flags |=  2 << EMAC_PKT_FLAG_TO_PORT_SHIFT; // Send on port 2

or

p_pkt_desc->Flags |=  1 << EMAC_PKT_FLAG_TO_PORT_SHIFT; // Send on port 1

I checked with the debugger that the flag is set correctly, but it just ignores the flag and sends on both ports anyways.

Additionally, it is kind of random if the second port negotiates 100Mbit/s or 1000Mbit/s. Can I enforce a 1000Mbit/s connection?

  • Hi,

    For 1000Mbps , you may look at pdk_am57xx_1_0_xx\packages\ti\board\diag\gmac\src\gmac_main.c, function LinkSetup(). For how to select which port to send out packet, I will check and get back to you.

    Regards, Eric
  • lding said:
    Hi,

    For 1000Mbps , you may look at pdk_am57xx_1_0_xx\packages\ti\board\diag\gmac\src\gmac_main.c, function LinkSetup(). For how to select which port to send out packet, I will check and get back to you.

    Regards, Eric

    Thanks a lot! I'm looking forward to your answer regarding the issue regarding the directed messages.

  • Hi,

    For selecting the port to send packets, I thought what you did in EMAC is the same way what we did in NIMU driver. It worked in NIMU and so is expected to work in EMAC as well.

    Can you upload the files you changed in the EMAC loopback test example and I can try to reproduce?

    Regards, Eric
  • lding said:


    For selecting the port to send packets, I thought what you did in EMAC is the same way what we did in NIMU driver. It worked in NIMU and so is expected to work in EMAC as well.

    Yes, that specific line is actually from the NIMU driver

    lding said:

    Can you upload the files you changed in the EMAC loopback test example and I can try to reproduce?

    Of course. Here they are

    EMAC_BasicExample_evmAM572x_ibox.tar.gz

    Here is my example code. The changes to the basic example are:

    1. For starting the link call emac_check_status() instead of emac_check_loopback_status(). That does an emac_poll for the link negotiation.

    2. Disable receive task.

    3. Added the "p_pkt_desc->Flags |=  1 << EMAC_PKT_FLAG_TO_PORT_SHIFT;" line in void app_test_task_send_pkts()

    Regards,

    Andri

  • Any news? Did you succeed in reproducing the issue?

    Regards,
    Andri
  • Hi,

    Here is what I did: I used processor SDK RTOS 5.2 (pdk_am57xx_1_0_13), the code is somewhat different from yours, not sure what release you used. But the code to change loopback to non-loopback is isolated, I was able to merge your changes into the test case.

    The AM572x GP EVM has two Ethernet ports, the top one is ETH0, the bottom one is ETH1. In your emac_check_status(), you called the emac_poll() for both ports 0 and 1, to pass that I need two separate Ethernet connection to two separate network which I don't have.

    I commented out either emac_poll (0) or emac_poll(1), based on which Ethernet port is actually connected to pass this link_status check. For this test, I connected to port 1 (bottom one) and with the code p_pkt_desc->Flags |= 1 << EMAC_PKT_FLAG_TO_PORT_SHIFT; // Send on port 0. This code expects to send out packets on port 0 only, however I was able to capture packets on port 1. The packet is defined by test_pkt[] inside test_utils.c.

    So I thought I was able to reproduce your issue. I opened a ticket for engineer team for investigation.

    Regards, Eric
  • lding said:
    Hi,

    Here is what I did: I used processor SDK RTOS 5.2 (pdk_am57xx_1_0_13), the code is somewhat different from yours, not sure what release you used. But the code to change loopback to non-loopback is isolated, I was able to merge your changes into the test case.

    The AM572x GP EVM has two Ethernet ports, the top one is ETH0, the bottom one is ETH1. In your emac_check_status(), you called the emac_poll() for both ports 0 and 1, to pass that I need two separate Ethernet connection to two separate network which I don't have.

    I commented out either emac_poll (0) or emac_poll(1), based on which Ethernet port is actually connected to pass this link_status check. For this test, I connected to port 1 (bottom one) and with the code p_pkt_desc->Flags |= 1 << EMAC_PKT_FLAG_TO_PORT_SHIFT; // Send on port 0. This code expects to send out packets on port 0 only, however I was able to capture packets on port 1. The packet is defined by test_pkt[] inside test_utils.c.

    So I thought I was able to reproduce your issue. I opened a ticket for engineer team for investigation.

    Regards, Eric

    Thanks a lot for your update!

  • Hi,

    Is there any update on the ticket?

    Regards,
    Andri
  • Hi,

    Sorry, our engineer is still looking into the issue and I will update once they have any progress.

    Regards, Eric
  • Hi,

    This issue was recorded in TI internal bug tracking system and was assigned to engineer team to investigate. The fix is preliminarily planned in the PRSDK RTOS 6.0 release (by end of Q2 2019). Please check with that release once is available. I am closing this thread.

    Regards, Eric
  • Eric,

    From customer:

    I am not yet sure if it isn’t just some configuration issue.

    As far as I understand the Ethernet driver has 2 different modes. Namely dual EMAC mode and switch mode. To me it feels like the driver is just in the wrong mode, but I couldn’t find any documentation how to configure in the low level driver mode.

     

    From your reply it sounded like for the NDK stack everything is working fine, so I am kind of confused why it shouldn’t work for the low level driver.

     

    So my question: Is it also broken for the NDK stack and the whole dual EMAC mode or is it just a configuration issue?

  • Rogerio,

    Please let customer know that, the dual EMAC NDK example is tested in a way that only one Ethernet cable is connected to a PC host. Then the PC is re-configured to a different subnet and connected to a different EMAC port. Certainly this example worked, but it can't rule out the AM57x sends packets to both ports (we just don't know it).

    The investigation for this issue is still preliminary, it is not sure if it broke in NDK or EMAC driver. The planned fix is in the coming 6.0. We will have more clarity as time goes by.

    Regards, Eric
  • Eric,
    Thanks. I sent him this link and in case he has questions, sure he will post here.