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

Softdevice address not correct in RAM position 0x20000000

Hi!

In our development we are using nrf52833 and for the first development phase we used the SDK 17.0.0. In that case I used the usbd_ble_uart example with s113 and it works as expected. Now we have migrated to SDK 17.0.2 where we intergrate the usbd functionality to another project using the softdevice s140. The problem is that when sd_softdevice_enable() function is called the softdevice address at position 0x20000000 is not 0x0100 as expected it's 0xA801BE00 and therefor the init of the softdevice crash.

BR

Parents
  • Hi again ! Here is the memory setup for the project: FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x80000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x20000

    FLASH_START=0x27000

    FLASH_SIZE=0x59000

    RAM_START=0x20010300

    RAM_SIZE=0xBCF8

    What I mean is that when I enter the application and reach the first breakpoint at the firs function in main function I look at the memory address 0x20000000 and there should be the softdevice address 0x100 but that is not the case. If I countinue with the code I enter sd_softdevice_enable and that function makes a call SVCALL function for the sd_softdevice_enable and when I step in the assembler code I see that the program reads address 0x20000000 for the stored value for the address for the softdevice but since the softdevice address isn't there is an exception. So I would like to know more in detail how the init is performed. Who puts the softdevice address at 0x20000000 and when is that done during init. Is that done during execution of the mbr code at startup or is the softdevice responsible for that? I need as many details as possible to be able to se what's going wrong.

    BR

Reply
  • Hi again ! Here is the memory setup for the project: FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x80000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x20000

    FLASH_START=0x27000

    FLASH_SIZE=0x59000

    RAM_START=0x20010300

    RAM_SIZE=0xBCF8

    What I mean is that when I enter the application and reach the first breakpoint at the firs function in main function I look at the memory address 0x20000000 and there should be the softdevice address 0x100 but that is not the case. If I countinue with the code I enter sd_softdevice_enable and that function makes a call SVCALL function for the sd_softdevice_enable and when I step in the assembler code I see that the program reads address 0x20000000 for the stored value for the address for the softdevice but since the softdevice address isn't there is an exception. So I would like to know more in detail how the init is performed. Who puts the softdevice address at 0x20000000 and when is that done during init. Is that done during execution of the mbr code at startup or is the softdevice responsible for that? I need as many details as possible to be able to se what's going wrong.

    BR

Children
  • Hi,

    What you are looking at there is related to the interrupt forwarding done by the MBR. At 0x20000000 you will see 0x1000 which is the start address of the SoftDevice and at 0x20000000 you will normally see the start address of the application (which equals the SoftDevice size). However, if in bootloader mode for instance, you will see the start address of the bootloader instead.

    If you do not have a bootloader, the MBR will by default handle this. If you do, that may send MBR commands to change interrupt forwarding etc. using the available MBR commands.

Related