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

Bootloader Jump to Main application crashes after modifying RAM_START address from 0x20002300 to anything else

Hi there...

I am using :

Device :Custom board using nrf52840 (fanstel module BT840)

SDK : nRF5_SDK_17.0.2

SoftDevice : S140 7.2.0

In order to add DFU capability on our product, I started with pca10056_usb_debug secure bootloader, first tested it on dev board (PCA10056) with ble blinky application everything works fine as expected. Then ported usb bootloader to our custom board and updating ble blinky application  works ok.

When i try to flash our real application, DFU process finishes successfully after BL reboots and tries to jump to our real application there it crashes (it never enters the main function of application).

The only difference in ble blinky and our real application is the application size and RAM_START setting which is 0x20002300 in blinky app but 0x20002bf0 in our real application.

I am wondering if i need to modify some setting in boot loader in order to compensate this RAM_START modification?

But my understanding is the way control flows is as follows :

If BL is present :

MBR->BL>SoftDevice->Application.

else if there is no BL:

MBR>SoftDevice->Application.

So basically Softdevice knows how to jump to main application as i can run/debug my real application without BL in the picture.

And as i understand the BL functioning it always calls the Softdevice (0x1000) and then its SD responsibility to jump to main application.

So why this RAM_START is an issue for Bootloader?

Will appreciate any help/ pointers to documentation which clarify this question...

Thanks a lot!

Parents
  • Because the RAM start address is overlap with your softdevice memory. So that the system can't work normal. So the SD application notes is mention that the ROM start addrress for each version(Code size fixed). But the RAM start address should be depends on your ble service resource in SD(RAM size not fixed depend on service UUID counts ,w/r characteristic ,central & peripheral numbers).

Reply
  • Because the RAM start address is overlap with your softdevice memory. So that the system can't work normal. So the SD application notes is mention that the ROM start addrress for each version(Code size fixed). But the RAM start address should be depends on your ble service resource in SD(RAM size not fixed depend on service UUID counts ,w/r characteristic ,central & peripheral numbers).

Children
Related