nRF53 firmware update flow

Hello !

Looks like nRF53 firmware update is more complicate due dual core architecture. in SDK docs mentioned about different bootloaders and DFU tools.

Could you narrow minimal toolset what I can use for serial firmware update of both cores from one *.zip file ?

What  bootloader can be used ( nonsecure) and support updates of both cores?

What utility for firmware update available with source code can be used  and support both cores( I need to port it for RPi platform) ?

Please suggest minimal set for have solution what is close to nrf52 dongle like.

Regards,

Eugene

Parents Reply Children
  • Hi Amanda !

    I have found this link as well : https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#mcuboot-s-serial-recovery-of-the-networking-core-image

    and get impression that it is possible to network core as well.

    In my case firmware sizes for application and network cores can be  huge and I doubt If 2 copies of each can reside in flash memory. I would like to use SerialRecovery way to flash both cores. If some obstacles will be detected - external qspi flash memory can be an option to extend storage capacity.

    Could you correct me if I wrong in my assumptions.

    1. I need MCUboot bootloader ( with SMP server ) for application core and b0n for newwork core. They can be flashed by nrfjprog (via SWD interface).

    2. mcumgr can flash via serial connection application core or network core or both by using dfu_application.zip

    3. MCUboot locate network image to shared SRAM only ( App core SRAM 512K, max size of network core image is 256KB).

    Or what is shared SRAM in this context ?

    MCUBoot initiate reboot and b0n bootloader take image from SRAM and update network core flash memory.

    Normal application firmware should release network core from reset and wait ( how long ?) until b0n bootloader report that update of network core flash memory is completed ( or  timeout).

    Or MCUboot detect pending update for network core and wait end of it ?

    Or MCUboot provide ( via shared SRAM ) fragments of firmware for network core  and b0n bootloader update it ?

    Regards,

    Eugene

  • Hi, 

    The shared SRAM in nRF53 is a region of SRAM, accessible by both cores, is used for inter-core communication. In the nRF5340 SoC, the application core cannot access the flash of the network core. However, firmware upgrades for the network core are stored in the application flash. This is because of the limited size of the network core flash. Hence, a mechanism for downloading firmware updates from the application to the network core flash is needed. The PCD library provides functionality for both cores in this situation. See Peripheral CPU DFU (PCD). 

    When MCUboot receives a new network core application image, it writes the configuration for the network core bootloader to the shared SRAM. The configuration includes an update instruction and both the SHA and the data of the image. The network core bootloader performs any pending network core firmware update. It calls the Peripheral CPU DFU (PCD) library to inspect the SRAM region shared with the application core: If MCUboot has written an update instruction, the network core bootloader copies the specified data range to the application partition on the network core. Once the copy is done, the network core bootloader compares the SHA of the data in the application partition against the SHA specified in the shared SRAM. It then communicates the result of the comparison to MCUboot using the shared SRAM. See nRF5340: Network core bootloader.

    Regards,
    Amanda H.

  • Hi !

    Could you clarify update process a bit.

    - one instance of mcumgr is started and when it exit, both flash memories are updated.

    - MCUBoot write application core flash directly e.g no need any extra space reservation

    - MCUBoot load network core image and come configuration to shared SRAM directly  and after that reset/reboot network core and wait result of update and return it to mcumgr

    OR

    - MCUBoot  write network core update to application flash memory ( I need to reserve 256K block) and after that via shared SRAM just pass configuration and reboot network core and wait result of update.

    Looks like all of those details are not so clear in documentation and I have asked it here.

    Peripheral_uart sample is suggested for evaluate all of this workflow

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/samples/bluetooth/peripheral_uart/README.html#mcuboot-with-serial-recovery-of-the-networking-core-image

    But I haven't suceed yet with application extensions https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/samples/bluetooth/peripheral_uart/README.html#activating-sample-extensions

    Is this right example what can be used for case when SerialRecovery is expected for both cores and when

    solution includes application and network cores. May be someother samole can be used where IPV6 network stack in used in application core ?  

    Regards,

    Eugene

  • Hello Amanda !

    Thank you !

    I will continue discussion about bootloader configuration ( Direct recovery of both cores via serial port) in this thread : 

    devzone.nordicsemi.com/.../configure-bluetooth-peripheral-uart-application-bootloader-and-etc

    Regards,

    Eugene

Related