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
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people's questions & connect with other people.
Volt.Tech
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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