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

SDK 7.2 DFU (dfu_dual_bank_ble S110) programming failed @ address 0x10001000

  • SoftDevice : S110 7.1

  • SDK 7.2

  • Example : nRF51_SDK_7.2.0_cf547b5\examples\dfu\bootloader (trying dfu_dual_bank_ble_s110)

  • Using IAR 7.1

  • Modified SDK files : bootloader_settings_arm.c, bootloader_util_arm.c, and dfu_ble_svc.c

(copied asm code SDK 8.1 since I use ICCARM, thanks to Vidar Berg for answering my prev question.)

  • Using nRFGo Studio 1.19.0

  • Board : PCA10001 V 2.0.0

/*******************************/

First, I erased the flash and downloaded the SoftDevice to the board using nRFGo Studio.

Map1

After this process, I tried the example using IAR.

Since I changed the asm code, compile error does not occur anymore.

While downloading, however, error message appears.

err0

err1

Surprisingly, after this error message, when I view the memory using the nRFGo Studio,

it looks like this.

map2

So my questions are,

  1. Have the example code has successfully downloaded into the MCU?

Checking with the Master Control Panel or the nRF Toolbox App,

the app does not detect this device. So it failed, right?

  1. What adjustment is needed? These are the setting I used at IAR.

Added 7, July, 2015 : Considering the comparison (a picture below), looks like the programmed memory region needs adjustment. What address should I start?

set1

set2

set3

set4

linker 1

Added 7, July, 2015 : I think this part is the most suspicious part.

compare

(The Programming range is different.

The DFU example's range starts from the address of UICR which is 0x10001000.)

linker 2

linker 3

Preprocessor (Defined Symbols) :

BLE_STACK_SUPPORT_REQD SOFTDEVICE_PRESENT ICCARM NRF51 BOARD_PCA10001 __HEAP_SIZE=0

  1. Is there a link about how to use DFU (when using the Toolbox App) function?

/**************/

Added 7, July, 2015 : I see.

UICR

You mean this, right? After not checking this, as you said, there were no collision.

However, the program runs a loop executing WFE (Wait for event). Dis

Is this working correctly? Even though I press Button 0 or 1, it keeps running in the loop.

-Regards, Mango922

Parents
  • I think I know what happened. When you use the option "Enable Softdevice Protection in UICR" in nRFGo Studio, studio writes to UICR.CLENR0 --> 0X10001000.

    Then when you use IAR to write your example, it also tries to write different value to the same register at 0X10001000. This will corrupt the registers because you cannot update this register, only write new value when the register is clean.

    You can fix this by erasing the chip, NOT SELECTING the "Enable Softdevice Protection in UICR" option in nRFGo studio. Then 0X10001000 remains clean register when trying to write with IAR and the verification from JLink will pass.

Reply
  • I think I know what happened. When you use the option "Enable Softdevice Protection in UICR" in nRFGo Studio, studio writes to UICR.CLENR0 --> 0X10001000.

    Then when you use IAR to write your example, it also tries to write different value to the same register at 0X10001000. This will corrupt the registers because you cannot update this register, only write new value when the register is clean.

    You can fix this by erasing the chip, NOT SELECTING the "Enable Softdevice Protection in UICR" option in nRFGo studio. Then 0X10001000 remains clean register when trying to write with IAR and the verification from JLink will pass.

Children
Related