2023-02-08 04:24 AM
Hello,
I have a doubdt and I haven't found the solution on the internet (probably I haven't asked properly or I have been missunderstood)
The thing is that I have a peripheral driver,with a function to write and read to and from SPI, and between them, I have a delay.
If I have a Task, and from this task I call that function, with the delay being osDelay(), will it work, as the normal behabiour of calling osDelay from the task itself (allowing other tasks to run during the delay).
Thank you so much!
Solved! Go to Solution.
2023-02-08 04:59 AM
osDelay() is the correct funtion for OS-aware delay.
https://www.keil.com/pack/doc/CMSIS/RTOS2/html/group__CMSIS__RTOS__Wait.html
Doesn't matter if its called directly in the task loop or indirectly from a function in a task loop.
hth
KnarfB
2023-02-08 04:59 AM
osDelay() is the correct funtion for OS-aware delay.
https://www.keil.com/pack/doc/CMSIS/RTOS2/html/group__CMSIS__RTOS__Wait.html
Doesn't matter if its called directly in the task loop or indirectly from a function in a task loop.
hth
KnarfB
2023-02-08 05:07 AM
Perfect, thank you!