Device: nRF52832
SDK: v15.0.0
SoftDevice: S132 v6.0.0
The SDK v15.0.0 documentation for the peer manager states the following:
* operations, or if a previous call to this function has not
* completed. Try again after receiving a Peer Manager event.
Device: nRF52832
SDK: v15.0.0
SoftDevice: S132 v6.0.0
The SDK v15.0.0 documentation for the peer manager states the following:
Hi,
I must admit that I had not noised the formulation in the peer manager documentation that you referred to before, but I agree that it is contradicting. I think the problem here is not primarily how the peer manager behaves, but that the documentation is misleading at this point. I will make an internal ticket requesting that the documentation is updated.
Regarding the actual behavior, instead of blocking when busy, the API will return NRF_ERROR_BUSY. This is the same for most libraries and drivers in the SDK. If the function you are calling can return NRF_ERROR_BUSY, then you should handle it. In practice this just means that you should try to call it again a bit later. You can see from the implementation in peer_data_storage.c that if an FDS call return FDS_ERR_BUSY, this will be propagated as NRF_ERROR_BUSY by the peer manager.
Thanks for the response. Is this something that can be added to the peer manager in the future? I'm not suggesting that the API should be block if the flash driver is busy, but rather that the peer manager automatically retry at a later point in time instead of the application needing to set up retries.
I have added that request to the internal ticket. You should probably not expect this to be implemented in the peer manager soon, though.