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.

TDA4VM: How to change the SPI from polling mode to interrupt mode?

Genius 13655 points
Part Number: TDA4VM

Hello Champs,

pdk_jacinto_08_02_00_21

Customer modified the packages\ti\drv\spi\example\mcspi_slavemode\src\main_mcspi_slave_mode.c to interrupt mode, but it failed. 

MCU SPI0, master,non-dma interrupt mode,spi_soc.c isn't changed. 

How to change the SPI code from polling mode to interrupt mode? 

Below is the code modified.




Thanks
Regards,
Shine

  • Hi Shine,

    On which core do you want to get SPI interrupt and for which SPI instance? 

    For MCU SPI0, there is a direct interrupt for mcu R5F, but for Main domain R5F, you would require to configure R5F interrupt router. This probably have to be configured in the application..

    Regards,

    Brijesh

  • Hello, Brijesh,
    I want to use R5 mcu1_ The SPI0 and SPI1 of 0 were modified in the demo (main_mcspi_slave_mode. c) example of the drv>spi in pdk, changing the polling mode to the normal interrupt mode (the polling mode of the demo can be used normally). However, by reading the value of the SPI interrupt enable register, it is found that the register value has not been modified, or the original default value. If I want to use main_ mcspi_ slave_ How do I configure interrupts when modifying the example in the mode. c file?
    thank you!

  • Hello Peng xueliang,

    Which interrupt register are you looking for to change? When you make this change, do you see this example working? I think there are several test cases in the SPI example, where it enables interrupt mode, by setting pollMode to false. Could you please refer to these examples?

    Regards,

    Brijesh