This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a way to check for NRF_ERROR_BUSY?

Hello,

is there a way to check for NRF_ERROR_BUSY before issuing a new command?

The idea would be to create a timer to retry issuing a/the command if the NRF is not busy any more.

(I am currently on SDK 9, S130)

Thanks!

Parents
  • Hi,

    This will depend on the function. Some functions might give you callback to indicate that the procedure/operation the function did is finished, and that you now can call the function again. For other functions, you might need to call the function again to test if it’s ready. Adding a timer here could be solution.

    Note that NRF_ERROR_BUSY is sometimes a symptom on a function that is not used as intended. Example; if you use sd_ble_gatts_hvx() to send an Indication, but calls the sd_ble_gatts_hvx() again before you receive confirmation from GATT client on the previous Indication, you will get NRF_ERROR_BUSY. In this case the solution is to wait for confirmation in the BLE event BLE_GATTS_EVT_HVC before calling sd_ble_gatts_hvx() again.

  • Hello Sigurd, yes actually it can be a result of many things in my case and it makes it hard to trace. I moved to a timer implementation to overcome this. In any case, the way to go is via error handling. Thx

Reply Children
No Data
Related