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.

C6657 testudp failed



Hi,

I am trying to test the UDP loopback with C6657evm.

test setup

1. C6657evm with MCSDK 2.1.2.6 HUA demo, which has a UDP loopback daemon server.

2. Use  NDK winapps testudp.exe to send UDP packets and receive packet loopbacked from C6657.

note: testudp is modified to change the IPv4 max payload form 1472 to 1468

3. Use staticIP, point to point connection

4. Enable the UDP loopback from HUA embedded web page.

the testudp test fails.

If I run the same testudp test with MCSDK2.1.2.6 example helloworld or clent project it works. I compared the HUA project and clinet/helloworld project and found that the HUA project put [.far:NDK_PACKETMEM] in MSMCSRAM, while client/helloworld put it in L2SRAM. Then I changed the  [.far:NDK_PACKETMEM] placement and verified it's the cause for the HUA project to fail.

Any idea why placing [.far:NDK_PACKETMEM] in MSMCSRAM will cause the testudp to fail?  

 

GanZ  

  • Ganz,

    Thanks for testing and notification about udp loopback failed in the HUA demo, and the same test worked in
    in the NDK examples. The HUA demo have IPC based example, may be the development team have used the shared memory for NDK memory sections. I will take this to development team and modify this, if truly cause of the memory section.

  • Ganz,

    Please have look at the belo E2E post, get some detailed info for how to test the HUA

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/294025.aspx
    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/342436/1197912.aspx#1197912

    http://processors.wiki.ti.com/index.php/MCSDK_HUA_Demonstration_Guide#Troubleshooting

  • Ganz,

    However this discussion of thread can helpful for future readers, If you verified this thread.

  • Pubesh,

    Thans for the response. ButI am not fully understand your answer. Do you suggest the IPC in HUA demo might cause confilct? I modified the client/helloworld project to place [.far:NDK_PACKETMEM] in MSMCSRAM, then client/helloworld failed the test as HUA. Placing [.far:NDK_PACKETMEM]. in DDR3 has similar symton. I suspect the issue is with the prefetch buffer reported in another thread. I need some time to verify that as I am currently busy with other issues.

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/214649.aspx

     

    GanZ

  • Hi,

    Further testing shows that the issue is caused by cache coherence. The EmacRxPkt() function in PDK_c6657_1_1_2_6 nimu_eth driver call NDK function OEMCacheClean(), which in call Cache_wbInv() to invalidate the cache. Not sure why Cache_wbInv() is used here. Either Cache_wbInv() does not properly invalidate the cache, or the the cache write back overwrite the EMAC DMA  receive packet buffer.

    There are 2 options to fix the problem

    1. Use MPAX to remap the memory section of MSMCSRAM or DDR3 used by [.far:NDK_PACKETMEM] to a new memory section, disable cache for the new memory section.

    2. In EmacRxPkt() function, replace  OEMCacheClean with  Cache_inv().

     

    GanZ

  • Ganz,

    Thanks for the detailed info and also you provided the solution here. This will be useful for the future readers if they get similar issue.