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

9160 - from bootloader updating(flashing) new application and modem firmware - how?

Hi,

(see image below for clarity of this text)

In our product, we have this requirement.
- be able to update the application on the nRF9160.
- be able to update the firmware and keys/certificate on the nRF9160 modem.
- over serial line (from another processor, nrf52840, but will start with a PC usb-serial port first) so in the secure bootloader I'm thinking.

I understand the secure bootloader would be the right spot to put these features in.
- i'm considering having a pin, to select if the nrf9160 will boot into application, or stay in the bootloader, waiting for data in a serial (uart).
- input on this design idea?

I cannot find documentation on:
- how the secure bootloader and the application resides together - tips where to read?
- how to flash new application programmatically (from the bootloader I would need to do it).
- how to update the modem firmware from (bootloader, or application code, doesn't really matter) - just be able to do it at all.

Firmware update at customer (non factory)
- Our product will be out with many (10000) customers, and they will regularly put in a docking station, for updates.
- We will have the possibility to upload firmware updates in this case (to a serial port - for the bootloader, which I would make sure is started in special firmware upload mode).

Call for support from nRF
Who from nRF can guide me here?
It's urgent (as always). I have 3 weeks to implement this.

Cheers
Johan

  • I have not see any guidance on the ability to update the modem firmware from anywhere other than a host PC over USB.  I'm not sure if Nordic is planning to support this or not.

    As for the application firmware: start with the program in nrf/samples/nrf9160/http_application_update as your baseline.  I know the version as of tag v0.4.0 works properly.  It doesn't do the serial part you need, but it does properly build/link all the bootloader and application images properly which is the hard part.  You can actually probably ignore the http_application_update source code as it's just a method to push an update into flash over HTTP that would be activated on next reboot (not what you want).

    As for an explanation of what's going on, the documentation is unfortunately scattered.  Probably read through the mcuboot docs first.  The best place to start is probably here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html

    mcuboot has config options to work over UART, but I've never tried turning them on or using them.  Most of your work to be done will likely be in mcuboot to watch for a button on bootup and switch into your UART download mode.

  • Oh, and mcuboot supports "new" and "old" firmware with swap and fallback on failure already, so that part of your required functionality "just works".  The swap/fallback only happen at boot time, so you will need to reboot if the new firmware fails, probably either by user action or watchdog.

  • Thank you for your answer Jbrzozoski.
    I will follow your suggestion with tag v0.4.0 for http_application_update as baseline, and start reading the docs you suggest. I will get back to you with questions shortly.

    We will connect our devices in a USB-hub, going to a PC, but the nRF9160 will not be the processor directly connected to the USB-bus, only a slave processor to our nRF52840 , so we need to cover this with you.
    This setup: PC->USB->nRF52840->nRF9160->Modem (firmware update)

    We are unsafe to update the modem firmware if needed without this support; ie you release any necessary updates later on. We cannot be locked out on this one, since the product battery time is super important, and the modem firmware can absolutely have an effect on this.

    Who can I contact to talk about this requirement we have? We need to solve this case.

Related