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

Replacing bootloader through nrfjprog - Error: Single: Invalid Bank

I am trying to upload a bootloader to an nRF52832 chip. (This chip is on the ruuvitag and is programmed through their developer board).

I got the bootloader working on the DK but when I tried to upload it to the Ruuvitag I get the log output: Error: Single: Invalid Bank Info: Error code - sd_ble_cfg_set: 0x00000000

The ruuvitag comes with a bootloader based on SDK 12 and SD 3. I am using SDK 13 and SD 4. I am programming using nrfjprog and compiling with GCC.

I suspect that the issue is because of some settings related to the original bootloader that gets confused when loaded with the SDK 13 bootloader, but I am really stuck.

  • Hi Ishgum,

    Could you explain a little bit more how you test ? What do you mean by "upload it to Ruuvitag" ? How did you do that ? With which tool ?

    How do you plan to switch from SD3 to SD4 ?

  • Hey Hung, I am using the nRF52 DK, and programming the board through nrfjprog (over USB). I erase the board and then upload the bootloader and the relevant softdevices.

  • Hi Ishgum,

    You mentioned you erased the board. How would the previous bootloader has anything to do here ?

    Could you list exactly the command you used and all the log you get ? How do you build the bootloader, which S132 version you use. Please list your steps as detailed as possible.

  • Hey Hung, The command I used was: nrfjprog --eraseall -f nrf52 The output I get is: Erasing user available code and UICR flash areas. Applying system reset.

    I built the bootloader using gcc and a makefile. I was using soft devices v4 (I think that answers your question)

    The reason I thought that perhaps the previous bootloader was an issue was that there is the master boot record which keeps track of bootloaders loaded onto the board and I wasn't sure if this was erased with all the other flash memory. In addition to this, when I programmed the chip on the DK the bootloader worked, but when I tried to load it onto the chip on the Ruuvi it didn't. One difference I could think of between them was that the Ruuvi already had a bootloader on it.

  • After you do eraseall, the old bootloader is erased and there shouldn't be any problem with the MBR. Everything is erased with that command.

    I want you to post the full log when you get "Error: Single: Invalid Bank Info: Error code - sd_ble_cfg_set: 0x00000000"

    You would need to check if the RuuviTag has the 32kHz crystal on it. On the DK we have the crystal so the softdevice is initialize with the crystal enabled. You need to use 32kHz RC if you don't have the crystal. I suggest you to test with normal examples first, start with blinky, then ble_app_hrs, then you can start with the bootloader.

Related