This function is then calling all the rng_complete functions, these could be scheduling an another request, or setting the radio to listen is this is done in ISR context or in another thread with a higher priority than the thread that triggered the uwb_rng_request then the first thread will be locked waiting for the semaphore to be released. This could fix itself in the long run, but if the device was set to listen forever then that thread would be definitively blocked.
In the
uwb_rng_request
function at the end it waits for a semaphore to be posted, signaling the end of transactions:https://github.com/Decawave/uwb-core/blob/66f468659ec3353cf7fd6f2bd14f3a6cef397f4e/lib/uwb_rng/src/uwb_rng.c#L535-L538
But this semaphore is release in
tx_comeplete()
:https://github.com/Decawave/uwb-core/blob/66f468659ec3353cf7fd6f2bd14f3a6cef397f4e/lib/uwb_rng/src/uwb_rng.c#L913-L926
This function is then calling all the
rng_complete
functions, these could be scheduling an another request, or setting the radio to listen is this is done in ISR context or in another thread with a higher priority than the thread that triggered theuwb_rng_request
then the first thread will be locked waiting for the semaphore to be released. This could fix itself in the long run, but if the device was set to listen forever then that thread would be definitively blocked.