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.

IWRL6432BOOST: How can I read radar cube data via spi as callback mode

Part Number: IWRL6432BOOST

Tool/software:

I'm tring to read radar cube data via spi. I'm using the example soruce code from radar toolbox.

Basically I could read radar cube data with setting.

/* 1 -> Raw ADC, 2 -> 1D FFT, 3 -> 2D FFT, 0 -> No Transfer*/
#define SPI_DATA_STREAMING 2
/* 1 -> Via FTDI Chip, 2 -> Via Logic Analyzer, 0 -> No Transfer */
#define SPI_DATA_STREAMING_MODE 1
What i want to change here is I want to send the data with callback mode not blocking mode, so that the radar can do doa and cfar dpu during transfering the spi data.
For this i changed code like below, but it didn't work. 
Where shoud i change the code or what should i add?
Is that possible to send spi data by callback mode and peripheral mode?
MCSPI_OpenParams gMcspiOpenParams[CONFIG_MCSPI_NUM_INSTANCES] = {
    {
        //.transferMode        = MCSPI_TRANSFER_MODE_BLOCKING,
        .transferMode        = MCSPI_TRANSFER_MODE_CALLBACK,
        .transferTimeout     = SystemP_WAIT_FOREVER,
        //.transferCallbackFxn = NULL,
        .transferCallbackFxn = App_callbackFxn,
        .loopback            = MCSPI_LOOPBACK_DISABLE,
        .msMode              = MCSPI_MS_MODE_PERIPHERAL,
        .mcspiDmaIndex       = 0,
    },
};
  • Hi, We have not tested SPI data transfer via callback mode so far. Please allow me a couple of days to respond back.

    What is the behaviour you are observing when setting it to callback mode?

    Is the callback function triggered anytime?

    Regards, Sharan.

  • Dear Sharan

    spi callback function is triggered by MSCSPI driver after finishing trasnferring data  from what i understood.

    I want to send major and minor radar cube data through spi

    If I send the data by blocking mode which is implemented at radar tools soruce  code the timming chart is like below.

    What i want to change is that i want to send data by spi dma and callback mode, so that i can send the major data while doppler and cfar processing.

    This is radar tool's example code for sending radar cube data via spi.

    Sequenc is like this:

    spi busy low(inform to master for starting spi communication) --> spi transfer (when master starts communication, sensor will send the data)

    --> spi busy high

    I want to change the sequce like below:

    spi busy low(inform to master for starting spi communication) --> spi transfer (when master starts communication, sensor will send the data)

    --> spi busy high --> spi transfer (when master starts communication, sensor will send the data) --> callback is triggered after tx --> spi busy high at callback function

  • Hi,

    I understood the logic. When trying this approach, what is the behavior you are observing? Have you tried debugging as to where the code halts?

    What is the operating mode of McSPI, is it DMA mode?

    Regards,

    Sharan