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.

AM3359: CPSW's DMA sometimes doesn't sent out the packet.

Part Number: AM3359
Other Parts Discussed in Thread: SYSBIOS

Hi,

I am implementing Ethernet function without NDK and TI-RTOS for a SBL. I use APIs in starterware. Sometimes DMA doesn't send out the packet for specific buffer pointer of CPPI.

For example, I used two identical meaningless raw data in RAM, two CPPI buffers are as below as well:

When I wrote 0x4a102000 to TX0 HDP, 0x4a10200C became 0xD000003C. And I can see a packet in Wireshark.

However, when I wrote 0x4a102010 to TX0 HDP, 0x4a10201C also became 0xD000003C but I saw no packet in Wireshark.

DMA status is always idle, Tx INTSTAT is also set to 1. Does anyone know the possible reason?

Thanks.

Nathan

  • Hello Nathan,

    What is the version of the software you are running? Do you mean Starterware? Do you have plan to upgrade it to Processor SDK? Please take  a look at below link:

    https://e2e.ti.com/support/legacy_forums/embedded/starterware/f/790/t/628801?tisearch=e2e-sitesearch&keymatch=starterware

    best regards,

    David Zhou

  • Hi David,
    I used the STARTERWARE in the newest PDK for am335x. I am implementing my own SBL with Ethernet function, so I only use internal RAM. It’s not possible to use TI-RTOS and NDK.
    Do you know any possible setting or operations might cause this situation? It seems like the data memory is not available to DMA.
    Thanks.
    Nathan
  • Hi,

    Does the order matter? E.g, i you first wrote 0x4a102010 to TX0 HDP, will this work?
    Or the buffer pointer matter? E.g., if you wrote 0x4a102000 to TX0 HDP, with buffer pointing to 0x403072a, will this work?
    Or the buffer content matter? E.g., if you replace the working case buffer contents to the failure one, will this work? You have a length of 0x3C. The working one looks to be a MAC/IPV4 packets (I saw 0008 0045), what is the protocols of the failure one? Maybe the Wireshark can't recognize it and can't capture/display it properly?

    Regards, Eric
  • Hi,
    Only buffer pointer matters. I can still send data with pointing to other memories.
    The unavailable memory is not able to be sent by other channel or CPPI memory as well.
    WireShark can catch packets even the packet is meaningless.
    So, the unavailable memory seems like be locked/occupied or other reason that I don't know.

    Regards, Nathan
  • Hi,

    Do you mean:
    0x4a102010 0x40307336 0000003c e000003c worked? But
    0x4a102010 0x4030702a 0000003c e000003c failed?

    I don't see any relevance of those two addresses. It just sends out certain bytes of data from either address. How those two buffer addresses are allocated? Is that from your application?

    Regards, Eric
  • Hi,
    Yes, that's what I mean.
    These two buffers are located by my application.

    In my case, 0x4030702a is only failed in specific situations (I don't actually know what the "situation" is), because the only specific packet was not sent but I used the data buffer.

    I refer to an old lwIP application in am335x_sysbios_ind_sdk_01.01.02.01 and try to migrate it to be a SBL because it uses no OS.
    I think I missed something.
    BTW, when this problem happens, TX IRQ routine function is not issued even CPSW_CPDMA interrupt status is set. It enters IRQ routine after I write TX HDP few more times.
    Thanks a lot.

    BR, Nathan
  • Hi,

    It is hard to tell what the reason a particular memory region doesn't work when used as the data buffer. Is that your application can control this or any memory region can have such symptom?

    The Starterware support is discontinued and moved to Processor SDK RTOS. You may look at how the EMAC loopback example worked in Processor SDK RTOS for AM335x and port into SBL, this doesn't use NDK. software-dl.ti.com/.../Device_Drivers.html

    Regards, Eric
  • Hi Eric,
    I used Hilscher's Ethernet Analyzer and I found that some frames were no caught by Wireshark. So I already found the cause of my problem.
    It's not caused by CPSW.
    Thanks.
    Nathan