nRF9160 firmware update

Hello DevZone,

I am currently working with a nRF9160DK, and more precisely looking at bootloader/firmware update.
> developer.nordicsemi.com/.../ug_bootloader.html

I have a few general questions.


For my project, my needs are pretty basic: I want to be able to to update the application firmware over NB-IoT/LTE-M.
For a basic usage, the nRF Secure Immutable Bootloader (NSIB) as a single stage bootloader seems to be the best/simplest option. However, from what I understood, this bootloader only checks the memory before jumping to the app, but does not offer the ability to load a firmware from UART or cellular.
This leads to my 1st question : when using this bootloader, what is the workflow during production ?
Can the nRF9160 be programmed with NSIB first, then adding the app ? Do I need to prepare a combined file with both NSIB and app ?
Is there any documentation on that topic, so I get some info on the process (how to generate the files, which hardware/software tools to use, etc) ?

My second question is regarding implementation.
Since the NSIB does not support downloading the firmware from cellular, this needs to be implemented in the app.
Is there any example on how this is done. I was able to find code snippet here and there, but no detailed example.
Also, from what I understood, the entire process is quite high level, is this correct ? By this, I mean that I don't need to worry about the memory address used and so on, this is already handled by the library ?

Third, I was wondering if there is a simple way to perform a firmware update over UART ?
Not that it's an important feature, but it could be handy.

Lastly, I just wanted to confirm that the app firmware and modem firmware are 2 separate thing : updating the nRF9160 app does not affect the modem firmware ?

Thanks.

Parents
  • For my project, my needs are pretty basic: I want to be able to to update the application firmware over NB-IoT/LTE-M.
    For a basic usage, the nRF Secure Immutable Bootloader (NSIB) as a single stage bootloader seems to be the best/simplest option.

    If you are going to use a single stage you should consider using MCUboot instead NSIB as it is better supported within NCS (IMO).

    Can the nRF9160 be programmed with NSIB first, then adding the app ? Do I need to prepare a combined file with both NSIB and app ?
    Is there any documentation on that topic, so I get some info on the process (how to generate the files, which hardware/software tools to use, etc) ?

    You should not need to prepare anything, the build system outputs various binaries with everything combined and the OTA binary. https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_build_system.html#output-build-files . Ive only flashed nRF devices with a segger, I am sure there is other tools you could use.

    Since the NSIB does not support downloading the firmware from cellular, this needs to be implemented in the app.
    Is there any example on how this is done. I was able to find code snippet here and there, but no detailed example.
    Also, from what I understood, the entire process is quite high level, is this correct ? By this, I mean that I don't need to worry about the memory address used and so on, this is already handled by the library ?

    The fota_download library has good examples and is easy to use. It has a concept of DFU targets and uses the signed header to figure out where it belongs in flash. If you use the FOTA library, you do not need to worry about the memory address as it will handle it. See examples here:

    https://github.com/nrfconnect/sdk-nrf/tree/main/samples/nrf9160/http_update

    Lastly, I just wanted to confirm that the app firmware and modem firmware are 2 separate thing : updating the nRF9160 app does not affect the modem firmware ?

    Yup! They are seperate

Reply
  • For my project, my needs are pretty basic: I want to be able to to update the application firmware over NB-IoT/LTE-M.
    For a basic usage, the nRF Secure Immutable Bootloader (NSIB) as a single stage bootloader seems to be the best/simplest option.

    If you are going to use a single stage you should consider using MCUboot instead NSIB as it is better supported within NCS (IMO).

    Can the nRF9160 be programmed with NSIB first, then adding the app ? Do I need to prepare a combined file with both NSIB and app ?
    Is there any documentation on that topic, so I get some info on the process (how to generate the files, which hardware/software tools to use, etc) ?

    You should not need to prepare anything, the build system outputs various binaries with everything combined and the OTA binary. https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_build_system.html#output-build-files . Ive only flashed nRF devices with a segger, I am sure there is other tools you could use.

    Since the NSIB does not support downloading the firmware from cellular, this needs to be implemented in the app.
    Is there any example on how this is done. I was able to find code snippet here and there, but no detailed example.
    Also, from what I understood, the entire process is quite high level, is this correct ? By this, I mean that I don't need to worry about the memory address used and so on, this is already handled by the library ?

    The fota_download library has good examples and is easy to use. It has a concept of DFU targets and uses the signed header to figure out where it belongs in flash. If you use the FOTA library, you do not need to worry about the memory address as it will handle it. See examples here:

    https://github.com/nrfconnect/sdk-nrf/tree/main/samples/nrf9160/http_update

    Lastly, I just wanted to confirm that the app firmware and modem firmware are 2 separate thing : updating the nRF9160 app does not affect the modem firmware ?

    Yup! They are seperate

Children
Related