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.

CC1310 EasyLink Rx example - How to actually read the payload data?

Hi,

I have set up CC1310DK with one EasyLinkTx and one EasyLinkRx, running the examples bundled with TI-RTOS. The LEDs are blinking as expected.

When debugging the EasyLinkRx I look at the content of "'EasyLink.c'::rxPacket" but there's no data in either RSSI or payload. I also tried copying it to a new global variable in case the rxPacket often gets flushed or something.

From the EasyLinkTx example it's clear that payload should contain some randomized data. 

  • Hi

    rxPacket is only defined in the rxDoneCallback so you need to set a breakpoint in this function to view the content of the variable.

    I set a breakpoint at line 282: status = EasyLink_Status_Success; and were able to monitor the payload of every packet received.

    Siri

  • Are we looking at the same example?

    I'm using "TI-RTOS CC13XX and CC26XX 2.16.01.14"

    To monitor rxPacket I go to Expressions-tab, right-click, choose "Add Global Variables..." and then choose rxPacket from the list.

    How can I monitor the local rxPacket in rxDoneCb?

    I also put a breakpoint inside rxDoneCb at if (status == EasyLink_Status_Success), but it's at line 101.

    I get it now. I was only looking at the actual contents of the rxPacket which was a pointer so I only saw the memory addresses it pointed to. Is there a shortcut to viewing the contents of the memory at which a pointer points to? If I right click the contents of the RSSI pointer, 0x20000EC4, and choose  "View memory at value", it shows me memory location 0x000000E3 in the memory browser. However, if I manually type in 0x20000EC4 I see the actual RSSI value. If I do the same for the payload address I can see the payload. 

    However I do not understand the behavior I'm seeing, and am hoping you have an easier way for me to view the memory contents I'm interested in.

  • I was referring to the rxDoneCallback function in EasyLink.c In the version of TI-RTOs you are using, I set the breakpoint at line 268. If you want to look at the packet in the rxDoneCb function in the rfEasyLinkRx.c file you must use access the packet in someway to be able to to be able to see the variable in the debugger:

    For Example:

    /***** Function definitions *****/
    #ifdef RFEASYLINKRX_ASYNC
    void rxDoneCb(EasyLink_RxPacket * rxPacket, EasyLink_Status status)
    {
        if (status == EasyLink_Status_Success)
        {
            /* Toggle LED2 to indicate RX */
            PIN_setOutputValue(pinHandle, Board_LED2,!PIN_getOutputValue(Board_LED2));
            if (rxPacket->rssi > 0)
            {
              while(1);
            }
        }

    If you set a breakpoint where the LED is toggled you can see the rxPacket in the watch window.

  • Thanks for replying me, Siri.

    Why did you put in that while loop? Was it instead of a breakpoint? From my screenshot you can see that I also put a breakpoint where I tried to read rxPacket, so I don't see the difference between yours and my solution, except the while loop.

    Can you shed some light on the issues I was having in the debug view? The right click and "View Memory at Value" did not behave as I expected. Also I was requesting a simpler way to directly monitor the values at the memory locations of rxPacket.