Note: I am using v8.0.0 of the s110 softdevice on the nrf51822.
I am developing an application with the nrf51822 that uses pstorage, bluetooth, and SPI reads/writes.
My application generally works as follows:
-The chip periodically wakes up to read data over SPI, and writes this data to a buffer in RAM
-When the 'sync data' bluetooth command comes in over the BT, the application writes the data in the RAM buffer to pstorage, then sends an initial data frame over the bluetooth connection.
-On each BLE_EVT_TX_COMPLETE event that the bluetooth code receives, it grabs and sends new data from pstorage.
-When there is no more new data in pstorage, the application sends a final frame over bluetooth and continues data acquisition.
This application works as expected for a while, then randomly errors out with a 0x2001 (ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE) error code. Does anyone have any ideas at why this happens? Since it happens randomly and infrequently, I am thinking I must have a race condition?