Hi, I need to read SPI registers from the assignment as well as ISR. So setting a flag isn’t an option and I can’t take semaphores from ISR. Is there a way to block the R_SPI_WriteRead function? Thank You Alex Thomas
Hi,
I need to read SPI registers from the assignment as well as ISR. So setting a flag isn’t an option and I can’t take semaphores from ISR.
Is there a way to block the R_SPI_WriteRead function?
Thank You
Alex Thomas
Read less
Hello Alex, By default, the perpetration of the drivers in FSP is nonblocking. This is happening to improve the effectiveness of your code. That is the reason callback functions are added in order to be sure that the operation you want to perform is completed. Let's say for example that you want toRead more
Hello Alex,
By default, the perpetration of the drivers in FSP is nonblocking. This is happening to improve the effectiveness of your code. That is the reason callback functions are added in order to be sure that the operation you want to perform is completed.
Let’s say for example that you want to perform a UART read, and you call R_SCI_UART_Read() API, this API’ll return immediately and your code will enter the callback function you created in order to check if data is ready and if the read operation is actually completed.
In case you would like to make blocking the operation of R_SPI_WriteRead() maybe you should consider adding a wait after the call of the API in your code by using R_BSP_SoftwareDelay(), if this is what you’re meaning.
By making tests you can find the proper delay you need to set.
Thank you!
Best Regards,
See lessJulian White