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.

Setting up l2 cache, ndk stack problems

I am having trouble with a udp socket. It receives for a random time, then stops working and can even cause a crash.

I read in the ndk faqs that the ndk drivers need some l2 cache, and my configuration does not have any allocated. When I try to set the cache size to anything other than 0, I get this error message;

XDC runtime error:ti.platforms.evm6678.Platform.Instance#0: ‘l2Mode’ is sealed

I then have to delete the .config folder benath my project before I can build again.

Sometimes I see a stack overlfow error message just after the socket stops receiving.

  • Are you running one of the NDK example?

     

    Thanks,

    Arun.

  • I based my project on the ndk "hello world" example, but it now has two sockets which it sends and receives to/from alternately. Sometimes it will run for several thousand cycles and then stops. Sometimes it will oly run a few times before stopping and/or crashing.

    Inotice that the examples do not use l2 cache, but the ndk troubleshooting notes say that you should use it.

  • I am actually having the same problem, but I have 32k of L2 cache enabled.

     

    Basically, I receive 64 byte UDP packets for some amount of time, and then my Daemon callback function stops getting called.  I also can no longer ping my board.  I am using a  6472-EVM.

    I have tried making my call back simple.  all it does is read the available data into a buffer and return 1.  I also tried upping the priority of the stack which does not help.  It really looks like the NDK stack can only receive a certain number of packets and then it just dies.

  • So i found the answer to my problem.

    After reading the packet with 

    payload_byte_cnt = (int)recvncfrom( s, (void **)&pBuf, 0, (PSA)&sin1, &tmp, &hBuffer );

     

    I wasnt freeing the data buffer with recvncfree(hBuffer);

     

    Everything works well now