nRF52811 with IAR Embedded Workbench 8.42.1 s140 sd_softdevice_enable hardfault

Hello,

I am trying to port ble_app_hrs_rscs_relay example to nRF52811 with softdevice s140 7.2 and nRF5_SDK_17.1.0. Everything works fine and the app is running and I can debug the app. When i reset the app i get a hardfault in sd_softdevice_enable if i download and debug the app. If i just debug without downloading i get error code 8 Invalid state. I just have the app without bootloader. 

Am I missing something? I really appreciate your help.de

Parents Reply
  • Debug in IAR does not issue a hard reset which means the SoftDevice is not correctly initialised. Further any debug break or step requires the use of J-Link Monitor. Here are some notes:

       // Allow all interrupts higher than _PRIO_SD_LOW (ie 4, BLE SD stuff) to continue execution even during a break
       // note Two J-Link commands are required in IAR settings:
       // SetMonModeDebug = 1
       // SetMonModeVTableAddr = ADDR
       //  where ADDR is the application's vector table located in FLASH, ie the start address for the
       // application, probably either 0x1B000 or 0x1C000 or 0x26000 depending on SoftDevice
       // See https://github.com/NordicPlayground/j-link-monitoring-mode-debugging
       NVIC_SetPriority(DebugMonitor_IRQn, _PRIO_SD_LOW);

    j-link-monitoring-mode-debugging

    IAR comments here:

    must-re-flash-softdevice-every-time-i-debug

Children
No Data
Related