Can I expect the call to sd_flash_erase()
to successfully erase a page of flash while I have an ANT channel open doing a low priority search?
What about when doing a BLE background scan?
Can I expect the call to sd_flash_erase()
to successfully erase a page of flash while I have an ANT channel open doing a low priority search?
What about when doing a BLE background scan?
Both BLE and ANT softdevices uses a sort of timeslot mechanism. Since sd_flash_xxx uses the same mechanism, there will be no conflict. So the answer is YES sd_flash_xxx operation will work with ANT and BLE activity. One thing worth mentioning is that the flash operation has the least priority when compared to BLE and ANT activity. So if there is a lot of protocol traffic, then you MAY get flash operation timed out as it did not get a timeslot to perform the flash operation within a reasonable time.
What we observe is that when doing a scan channel with EXT_PARAM_ALWAYS_SEARCH
and no search timeout, calls to sd_flash_erase()
never succeed. The channel id is set to 0,0,0
and the channel is open as a slave with priority 0
. There is a bunch of other ANT activity going on but none of that has any noticeable impact on the success of the flash erase call; the scan channel being open always however is a different story in our findings.
seems like the scanner is using the whole timeslot with EXT_PARAM_ALWAYS_SEARCH and no timeout.