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.

AWR1843: SPI transfer timeout

Part Number: AWR1843

Good Morning,

I'm trying to connect a custom board based on AWR1843 to a RaspberryPi, trough SPI interface. The RPi is set as master, and the AWR as slave.

The problem I'm facing is that, when the radar has data ready to be sent, I have to call SPI_transfer to prepare the transaction with the master, and then start the transfer in the RPi, but this function is blocking, so if the RPi is not connected or not ready, the radar waits forever. I tried to use the parameter "transferTimeout", but no matter what value I give to it, it seems to timeout immediately (if I leave the default value SPI_WAIT_FOREVER, it waits correctly without any timeout).

Is there something I'm not seeing? Maybe the timeout functionality does not work in SPI_MODE_BLOCKING (the only one supported)?

I tried to search the source code of SPI functions, in particular of SPI_transfer, for better understanding it and maybe change their behaviour, but I was not able to find it, it is provided by TI?

Many thanks,

Treves Mathieu

  • Hi,

    The SPI driver is provided in

    C:\ti\mmwave_sdk_03_05_00_04\packages\ti\drivers\spi\src

    We have an internal example of SPI communication. I can provide it to you if you are interested

    Thank you

    Cesar

  • Hi, 

    Yes I found that code, but then all of the SPI functionalities are "hidden" behind function pointers described only as, e.g., "A function pointer to a driver specific implementation of SPI_transfer()", so it is not possible to undestand what exactly are doing these functions. Unless I'm missing something?

    My (only) problem is that I need to add a timeout to the SPI_transfer operation, is it possible?

    If it is not possible given the code provided by TI, it is possible to have the sources for implementing myself some changes to the behaviour of SPI_transfer?

    Thanks,

    Treves Mathieu

  • Hi, 

    I resolved my problem. I found the complete drivers in the provided folders.