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

BLE_CLI generates a "SOFTDEVICE INVALID MEMORY ACCESS." error

Hi all.

For debugging my app (SD s132, V5.0, SDK 14.2), I'm using the NRF_BLE_CLI (I use Nordic the example with an external PCA10040, the Python script and PuTTY).

Unfortunately, randomly, I got an NRF_FAULT_ID_APP_MEMACC, that mean wich a "SOFTDEVICE: INVALID MEMORY ACCESS" error has been raised.

Observating the Stack pointer, ia == R12 = 0x00031389  (note that the call stack is empty...), I found that the responsible is the function "cli_ble_uart_read", used when a new command is received

Here the address of the function cli_ble_uart_read:

As you can see in the pictures, the MWU->PERREGION register are all 0, apparently, there are not a SD violation:

Here the CPU registers:

Please, can anyone help me?? I'm going crazy!

Thanks a lot!

Parents Reply
  • Hi Francesco,

    It doesn't make sense to me that there are no MWU events when you get the NRF_FAULT_ID_APP_MEMACC assert. Have you tried the same with a newer SDK version, 15.3.0 for instance? That said, we have a bug in the Softdevice that may wrongfully trigger this assert if critical regions are being used. Please try the following workaround to see if it makes any difference: "replace __NRF_NVIC_SD_IRQS_1 with the following in nrf_nvic.h , and recompile the user application:

    #define __NRF_NVIC_SD_IRQS_1 ((uint32_t)(1U << (MWU_IRQn - 32)))

Children
No Data
Related