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

  • If i reduce stack size to 255, as i found in this "devzone.nordicsemi.com/.../" and few similar questions, i can compile. But then when i want to flash (using keil) it looks like it's flashing, it says:

    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    

    And if i check with nrfgo studio i can see there's softdevice flashed on my chip, a bootloader (16kB) and free space for my application.

    Now if i understand this example correctly, it should start to advertise with name "Dfu.." right?

Reply
  • If i reduce stack size to 255, as i found in this "devzone.nordicsemi.com/.../" and few similar questions, i can compile. But then when i want to flash (using keil) it looks like it's flashing, it says:

    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programing device.
    

    And if i check with nrfgo studio i can see there's softdevice flashed on my chip, a bootloader (16kB) and free space for my application.

    Now if i understand this example correctly, it should start to advertise with name "Dfu.." right?

Children
No Data
Related