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

Random 0x2001 (ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE) error

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?

  • Can you specify which function is returning the error code? It looks like this error code is only returned from the sd_nvic functions related to IRQ. The error is "IRQn is not available for the application". Most likely this is because the code try to access peripherals that are blocked by the SoftDevice, see here (should be the same for s110). For example:

    sd_nvic_EnableIRQ(RADIO_IRQn);
    

    Will return error ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE.

  • Ole - thanks for your response. I noticed that the RTC0 is "blocked" on that table. I am using RTC0 and TIMER1 to keep track of time for the device. I used the PPI to cause the RTC0 overflow event to increment the TIMER1->count.

    I wonder if this is causing the issue. I'll try switching to use RTC1 tonight and see if it resolves the issue.

  • Using RTC0 will definitely cause problems.