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
  • void app_mwu_disable(void) //WORKAROUND ADDED 2-1-2019
    {
    NRF_MWU->REGIONENCLR
    = ((MWU_REGIONENCLR_RGN0WA_Clear << MWU_REGIONENCLR_RGN0WA_Pos) | (MWU_REGIONENCLR_PRGN0WA_Clear << MWU_REGIONENCLR_PRGN0WA_Pos));
    NRF_MWU->REGIONEN;
    __DSB();
    }

    THAT can not fix this issue.

    but ı change  from *((volatile uint32_t *)0x40000E00) = m_anomaly_198_preserved_value; to *((volatile uint32_t *)0x40002000) = m_anomaly_198_preserved_value; in anomaly_198_disable and enable  now not crash my responder continues advertise but dwm3001c module that has a responder code can not receive frame .

    responder can frame only one time in 15-20 loop.

    but if ı do not use SD AND BLE , my RESPONDER CAN RECEİVE FRAME WELL.

    now how can I fix to receive frame issue?

Children
Related