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

problems with DFU bootloader

Hello.

I want to flash DFU bootloader with keil on chip nRF51822-CEAA (256kB flash, 16kB RAM). I'm using s130

The areas i write to are:

IROM start: 0x3C000
IROM size: 0x3C00
IRAM1 start:0x20002C00
IRAM1 size:0x2048
IRAM2 start:0x20004C48
IRAM2 size:0x80
(NoInit checked for RAM2)

I use IROM size 0x2048 because, if i use 0x1380 (like i found in some answered questions about DFU on this forum) i get an error which says that "... 0x800 bytes could not fit into .ANY selector(s)".

When i use my settings i can compile just fine, but then i get error "error: The are to write is not erased".

Note that i followed all the steps in dfu_dual_bank example. I erased chip, flashed SD130, and then it stopped at flashing bootloader.

Best regards, Nejc

Parents
  • The 16kB RAM is memory mapped from 0x20000000 to 0x20004000 and setting IRAM1 size to 0x2048 and IRAM2 start at 0x20004C48 will therefore not work.

    The correct ROM/RAM settings for the bootloader example a nRF51 chip with 16kB RAM is:

    IROM start: 0x3C000 size: 0x3C00
    IRAM1 start:0x20002C00 size:0x1380
    IRAM2 start:0x20003F80 size:0x80(NoInit checked)
    

    This is the only setting that has to be changed in the SDK bootloader examples in order for it to run on a 16kB RAM variant of the nRF51.

    Have you altered the example? Are you using Cross_Module Optimization, MicroLib and optimization set to level 3 (-O3)?

    -Bjørn

  • I searched the community and found an example you posted to someone. I tried using that example and it compiled successfully (without having to set stack size to 255, and with settings for 16kB RAM). I found the answer in this question. Now i have another problem.. my j-link doesn't detect my board.. but i'll fix that. I'll let you know if DFU works once i'll be able to flash it.

    Thanks for all your help.

Reply Children
No Data
Related