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.

TI-RTOS implementation issue in udpEchoCC3x00

Other Parts Discussed in Thread: CC3200, SYSBIOS

I'm using the CC3200 LP and the udpEcho example as a template for my application.

udpEcho application works fine but I have a problem understanding and adapting it for my requirement.

In short I have several tasks along with a clock module task that need to run concurrently with the udp transmission and reception of data. I'd like to use the static configurator to create these.

Problem I see is the udpEcho implementation.

The 'Application Design Details' of the readme file say the application uses two tasks but I only see one, that of the dynamically created udpEchoTask which first opens the WiFi and gets a connection.

It then calls the 'echoFxn(UDPPORT)' which undertakes the send/receive. However from what I see this task doesn't return but just stays in a do/while loop handling send/receive of udp data.

I guess I was more expecting first an initialisation/connection phase and then a 'receive task' (with perhaps a semaphore flag) and also a 'transmit task'. That would seem logical to me and make it simple to add further tasks as necessary. I realise however it's more likely my early understanding that's not up to scratch.

I did mange to move the dynamically created 'udpEchoTask' to the static configurator and that works.

Any clarification or pointers to help improve my understanding to adapt udpEcho for my application gratefully received !

Stuart

Edinburgh. UK.

My application uses 2 x LP in station mode with a std AP.

(the CC3200 SDK examples 

  • Hi Stuart,

    To inspect the number of tasks running at a given point of execution, you can use the RTOS Object View in CCS. Here's a little Youtube video of it:

    https://www.youtube.com/watch?v=_F2bVVqaeFk

    This tool should help you with understanding what is going on.

    The Tasks->Detailed tab shows 3 Tasks running in fact - udpEchoTask, the SimpleLink spawn task plus the Idle Task:

    The example itself is structured so that one task handles everything. It receives packets from a socket and replies to them in the same task. You can certainly break this behavior between two tasks, but in this simple example it is more efficient to do so within one, given everything happens in locked steps as a sequence, and each task requires memory to be allocated for it, so the fewer the better.

    When working with SYSBIOS (ie, TI_RTOS kernel), the best documentation resides in the <ti rtos installation directory>\products\bios_x_xx_xx_xx\docs directory. There you will find a user guide and an API guide which should help you get started.

    Hope this helps!

    Vincent

  • Hi Vincent,

    Many thanks for your prompt reply !

    I've had a look at the YouTube video and of course the ROV and System Analyser tools are indeed invaluable for understanding what's going on.

    I have moved udpEchoTask to the static configuartor and introduced a couple of more simple tasks (including a CLOCK module driven task) and can see everything executing nicely (also I'm making use of console System_printf and LED0).

    For my application my next step will be to separate out the UDP send and receive into two separate tasks and once at that point I'll have the structure I need in place.

    Thanks once more and happy to close this one out ! (however we do that(?))

    best regards,

    Stuart

     

  • Hi Stuart,

    Glad to hear it helps! There should be a button that allows you to mark this answered:

    Best regards,

    -Vincent