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

S210 Bootloader

I have a blank nrf51422 that I have successfully loaded with the latest S210 softdevice and working application. However, I do not see the bootloader region occupied when I open NRFgo studio. Am I to assume the bootloader is there? If not can someone point me to where I can get it? I've been searching the forums and have not been successful. I'm trying to make the device DFU. Many Thanks,

  • Thanks for helping me Testy. My device is the QFAA. I tried to load the app both ways. Through DFU and SWD. DFU stays stuck after it says "Image upload complete. Image will be activated, do not power down device." It loads through SWD, but does not run unless I erase the part and load the S210 and App with no bootloader. I new using the part so I'm not totally sure where to set the flag for a valid app. Thanks again!

  • OTA DFU selfsets app valid flag, if processed successfully. Value at BOOTLOADER_SETTINGS_ADDRESS must be 1 after it (unfortunately this approach is valid for BLE bootloader). Check that address (typically 0x3FC00). Study this

    Taken from ANT bootloader_settings_t structure:

    • sd_image at 0x3FC00
    • bl_image at 0x 3FC04
    • ap_image at 0x3FC08 (here is transferred app size in bytes)
    • src_image_address
    • valid_app (Valid application is present if value is 0xFFFFFFFF or 0x00000000)
    • reserved_1
    • reserved_2
    • valid_slot
  • Thank you, Yes, I was able to find the flag.

    So I worked on this for a few days and still no luck. I switched to the NRF51 dev kit to remove any variables. The device is the QFAC

    Here are the results/settings: I still kept RAM settings for 16K even though the device can handle 32K.

    Application - IROM start 0xD000 Size 0x17400 (also tried 0x2E800) Application - IRAM1 start 0x20000900 Size 0x1700

    Bootloadter - IROM start 0x3B800 Size 0x4800 Bootloader - IRAM1 start 0x20002000 Size 0x1700 (tried with NoInit checked and unchecked)

    Here is what happens (all through SWD since OTA does not work):

    Test1 (using combinations of IROM and IRAM above):

    -Device is totally erased, flashed with S210 4.0.1

    -Application is flashed

    -Bootloader is flashed

    **Result Test 1: Application works fine. Bootloader debug shows application is valid when I force it to run. The OTA does not find the device because there is a valid app running on BANK0 and the bootloader terminates (which is operating as expected.)

    Test2 (using combinations of IROM and IRAM above):

    -Device is totally erased, flashed with S210 4.0.1

    -Bootloader is flashed

    OTA finds device and when an update of application is attempted, it shows that it is completed and updates the image, but debug shows that application is invalid (!!). In other words, OTA seems to work, but application does not run when flashed over OTA and flagged as invalid.

    I can't seem to find why my application is found to be invalid by the bootloader when done through OTA but valid when done through SWD. Any suggestions on where to look? It runs when flashed through SWD but not when flahsed through OTA.

    **Result Test 2: Application does not work.

    Thanks again!

  • I am having the same trouble with the ANT+ bootloader. To take it one step farther, once the application is OK to run, holding down button 1 and hitting the reset on the nRF51DK (which should put it into bootloader mode) causes the system to halt in the bootloader. I have narrowed it down to the SOFTDEVICE_HANDLER_INIT() call that is hanging if the button is pushed.

  • I stopped working on this for a bit, but just got back on it. I finally got it to work. The problem was that I was constantly getting a flag saying that the app was invalid. Once I disabled the Softdevice protection (UICR.CLENR0), the application was flagged as valid and the bootloader worked. Comments?

Related