Pstorage I use it in nrf51822, feel that sometimes back to cause Bluetooth abnormal, I don't know what is the reason. Especially when calling uint32_t erase_inner_flash(pstorage_handle_t base_handle, uint32_t data_size, pstorage_size_t block_num)
{
pstorage_handle_t block_handle;
uint32_t err_code;
err_code = pstorage_block_identifier_get(&base_handle, block_num, &block_handle);
if (err_code == NRF_SUCCESS)
{
return err_code = pstorage_clear(&block_handle,data_size);
}
return err_code;
When},
Bluetooth will be abnormal, and the data of the sensor can be read only once through SPI. Why is that? There is also a one-second delay in the life of accessing data and reading data. After running for a period of time, it will also be abnormal, what is the reason?