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

Calling SD API could not enter the SVC_Handler in the Softdevice

My environment:     Keil 5; nRF52832 SDK 15.2 ; Softdevice S132 6.1.0

The uart bootloader code locate in the address:  0x70000 - 0x80000 ; (The MBR in 0x70000)

The application code locate in the address:  0x30000 - 0x50000; (The MBR in 0x30000)

My power-on startup process:

softdevice ->

jump to the bootloader based on the UICR  ->

judge if application is valid ->

modify the SCB_VOTR address to 0x30000 and jump to 0x30000

Now I call the nrf_sdh_enable_request api in my application, the api will call sd_softdevice_enable. This is a assembly statement : SVC 0x10.

Then the CPU will jump to the SVC_handler in the application (0x30100), not the SVC_handler in the softdevice (0x100). And the softdevice can not be enabled at all.

It's my first experience to develop on nRF52832. So I'm confused about how the application works when the interrupt entry address  is  defined in the softdevice.

Related