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.

CC1352R: CCS/CC1352: Get IQ samples in Continuous RX mode and send to uart in real-time

Part Number: CC1352R

Tool/software:

Hi everyone,

I am working on the CC1352R to capture IQ samples, using the rfPacketRx example from the SDK. I am following the TI document SWRA571.pdf. Currently, I receive data in the callback function, but when I try to print this data using Display_printf(), the callback function stops. I believe this is happening due to buffer overwrites in the RF core, which then causes the callback to stop. I am looking for guidance on how to handle the buffer so that data is received continuously and can be sent to UART without interruptions. Any help on this issue would be greatly appreciated. 

  • Hi Yasir,

    as you are in continuous Rx the radio core will forward all incoming data to the application and trigger the callback function to write the data to the buffer. If you slow down the callback function by any data processing it will end in buffer overflow. If you want to observe how fast the data is received I would suggest you to implement toggling an led in the callback function.

    Printing data on the UART is a very slow process compared and if you need to implement it then it must be outside of the callback function so that you are not interrupting it.

    Alternatively you can use the memory overview to copy the received data directly from the buffer.

    Kind regards,
    Theo

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #include <stdlib.h>
    #include <stdio.h>
    #include <FreeRTOS.h>
    #include <task.h>
    #include <semphr.h>
    #include <ti/drivers/rf/RF.h>
    #include <ti/drivers/GPIO.h>
    #include <ti/drivers/UART2.h>
    #include <ti/display/Display.h>
    #include "FreeRTOSConfig.h"
    #include DeviceFamily_constructPath(driverlib/rf_prop_mailbox.h)
    #include "ti_drivers_config.h"
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    Hi @Theo Lange,

    Thank you for your quick reply. I have not processed much in the callback function. I am using a semaphore for synchronization. I copy data to a buffer, signal to give the semaphore, and then print the contents of the buffer on UART to see what’s inside. I will retrieve IQ samples later. However, the callback stops after a while, and nothing happens. I have attached the code that I am using with it. If you could point out any potential issues if I am doing something wrong or any alternative approach please let me know.
    Thank you

  • When you stop getting callbacks, I assume that the status of the RX command is:

    RF_cmdPropRx.status = 0x3802 (ROP_ERROR_RXFULL)

    Which indicates that you are out of RX buffer during reception in a partial read buffer.

    This again, is most likely because stuff in your application is taking too long (Display_printf) so that your buffers are not released fast enough

    currentReadEntry->status = DATA_ENTRY_PENDING;
    currentReadEntry = (rfc_dataEntryPartial_t*)currentReadEntry->pNextEntry;

    If you want to print the received IQ samples over UART, you should do this AFTER you have received the samples that you want to view.

    I do not think you are able to print this while handling the callback at a fast enough speed.

    siri

  • So, Is it not possible to get IQ samples and send them to UART in continuous mode? I wanted to analyze IQ sample data in constant mode, It should be like a receiver that always looks for a data value.
    If I make changes in RF configurations like decreasing symbol rate make it possible by slowing the interrupt of the callback function?

  • I guess that depends on your UART code, the UART speed, the data rate you are using, your buffer sizes etc.

    I am simply saying that if you see a problem that the callback suddenly stops, that most likely means that the radio has exit RX state due to an error, and that this error most likely is an overflow (since RX is configured for infinite mode, it will not exit unless an error occurs).

    To confirm this I have asked you to check the status of the RX command when the error occurs.

    As the app note state, we will not provide any example code etc. on how to handle/process the incoming data. We simply show how you can get hold of the data.

    Siri