Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_app_uart Can not be loaded completely on nRF 51822

I have problem flashing main program and SoftDevice on the nrf 51822 module. I have Keil version 5.24 and I am using SDK v12.3 .

I can flash SoftDevice easily but after that I can not flash the main program on the device. in the Keil it just shows the error erase failed, flash download failed - "cortex-m0" . But if i try to do this process by the nRFgo studio after that i flashed SoftDevice, when i try to flash the main program it shows the error : This hex file has data in SoftDevice region. Try programming using "Program SoftDevice", or erase all before programming.

Could it be caused because of ROM memory area configuration and addresses? If so how can i fix it?

Thank for your attention.

Parents
  • Hi,

    Could it be caused because of ROM memory area configuration and addresses? If so how can i fix it?

    Yes, the application need to be placed on top of the SoftDevice. See the figure here

    For the nRF51-series SDK 12.3 uses SoftDevice S130 v.2.0.1, and as described here, IROM needs to be 0x1b000 for this version when the SoftDevice is present. See this image from Keil:

  • Thanks, But i have some questions remained. The image you have shown memory allocation for application placement. What about SoftDevice ? I mean that as the table you have posted ROM allocation for SoftDevice starts from 0x00001000 So how about it's size ? Can you explain this ,too? And my another question is that So can we set start address more than APP_CODE_BASE?

  • I mean that as the table you have posted ROM allocation for SoftDevice starts from 0x00001000 So how about it's size ?

    From 0x00 to 0x00001000 you have the MBR. The MBR is part of the SoftDevice .hex file. The S130 v.2.0.1 Softdevice including MBR takes 108 kB(0x1b000).

    And my another question is that So can we set start address more than APP_CODE_BASE?

    No, the APP_CODE_BASE is fixed to 0x1b000 and is hardcoded inside the SoftDevice. This is the address the SoftDevice will branch to, and where you will need to place the application.

Reply
  • I mean that as the table you have posted ROM allocation for SoftDevice starts from 0x00001000 So how about it's size ?

    From 0x00 to 0x00001000 you have the MBR. The MBR is part of the SoftDevice .hex file. The S130 v.2.0.1 Softdevice including MBR takes 108 kB(0x1b000).

    And my another question is that So can we set start address more than APP_CODE_BASE?

    No, the APP_CODE_BASE is fixed to 0x1b000 and is hardcoded inside the SoftDevice. This is the address the SoftDevice will branch to, and where you will need to place the application.

Children
Related