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

SOFTDEVICE: INVALID MEMORY ACCESS

I am trying to migrate BLE peripheral implementation code from nRF52832 (SDK 132)  to nRF52840 (SDK 140)  using nRF52840 Preview-DK (PCA10056).

The application is based on freeRTOS and BLE is running as one of the tasks.

When I ran it I got error message " SOFTDEVICE: INVALID MEMORY ACCESS". 

During debug I comment out all BLE related functions calls it ran without error.

but when I uncomment ble_init()  function (see below function code) I received again the error message.

 

What can be the reason for this issue?

Thanks in advance

 

 

int
main(void)
{
...

   if (pdPASS != xTaskCreate(BLETask, "BLETask", BLE_TASK_STACK_DEPTH, NULL, BLE_TASK_PRIORITY,       &m_oBLETaskHandle))
  {
    NRF_LOG_WARNING("Init - BLE task creation failed");
    APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
  }

...

}


void BLETask (void * pvParameter)
{
   UNUSED_PARAMETER(pvParameter);
   LOGPRINT(LOG_PRINT_BLE, "BLE init");

   ble_init();

#ifdef BLE_ENABLE
   LOGPRINT(LOG_PRINT_BLE, "BLE enable - start advertising");
   // ble_start();
#endif

   while (true)
  {
    // ble_queue_service ();

    LOGPRINT(LOG_PRINT_BLE, "BLE Running");
    taskYIELD();
  }
}

void ble_init (void)
{
  ble_stack_init();
  gap_params_init();
  gatt_init();
  services_init();
  advertising_init();
  conn_params_init();
}


 

Parents Reply
  • I got sub-region number 0x1000 . what does it mean?

     <error> app: SOFTDEVICE: INVALID MEMORY ACCESS [0x1000]

    Is it related to below line from Table 2. Peripheral protection and usage by SoftDevice

    ID Base address Instance

    Access

    SoftDevice enabled

    Access

    SoftDevice disabled

    1   0x40001000         RADIO          Blocked4                     Open               


    Thanks in advance

Children
Related