Issue with nRF5340 Net core serial recovery

Hello,

I've an issue that I can't find clear instructions for the nRF5340 serial recovery for the network core.

Being able to update both cores from the bootloader level is crucial for my application, however, I feel like there's a lack of support regarding this area.

I've explored several threads here mentioning the same problem over several nRF Connect SDK versions, but most of them are out-of-date, and none of them reached a conclusion on whether it's possible or not.

Also, as mentioned in one of those tickets, it's mentioned that this Bluetooth: Peripheral UART sample project supports the Net-Core serial recovery by adding some extra configurations without mentioning how this can be tested or verified.

Also, the course for DFU from DevAcademy explicitly mentions that serial recovery for the net-core isn't covered.

Can you help with that?

FYI, updating the 2 cores over the serial port or using FOTA from the application works fine, but this requires the application to continue supporting this feature between subsequent versions and doesn't guard against application failures.

Thanks,

Ahmed

  • Hi  

    Yes, you upload them one by one, but for the NET Core image, you need to wait around 30 seconds after the upload to get the NET Core updated before resetting the device.

    This the MCUBoot conf file

    #
    # Copyright (c) 2024 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    CONFIG_PM=n
    
    CONFIG_MAIN_STACK_SIZE=10240
    CONFIG_MBEDTLS_CFG_FILE="mcuboot-mbedtls-cfg.h"
    
    CONFIG_BOOT_SWAP_SAVE_ENCTLV=n
    CONFIG_BOOT_ENCRYPT_IMAGE=n
    CONFIG_BOOT_BOOTSTRAP=n
    
    CONFIG_FLASH=y
    CONFIG_FPROTECT=y
    
    # MCUBoot serial
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y
    # Configure serial recovery to use CDC_ACM, which by default uses the USB
    CONFIG_BOOT_SERIAL_CDC_ACM=y
    
    # Decrease memory footprint
    CONFIG_LOG=n
    ### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
    CONFIG_CBPRINTF_NANO=y
    CONFIG_TIMESLICING=n
    CONFIG_BOOT_BANNER=n
    CONFIG_CONSOLE=n
    CONFIG_CONSOLE_HANDLER=n
    CONFIG_UART_CONSOLE=n
    CONFIG_RTT_CONSOLE=n
    CONFIG_USE_SEGGER_RTT=n
    CONFIG_RESET_ON_FATAL_ERROR=n
    
    # Increase the maximum number of image sectors MCUboot can handle
    CONFIG_BOOT_MAX_IMG_SECTORS=2048
    
    # Flash
    CONFIG_SPI=y
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_CS_WAIT_DELAY=5
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_NORDIC_QSPI_NOR=n
    CONFIG_MULTITHREADING=y
    CONFIG_BOOT_ERASE_PROGRESSIVELY=y
    CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y
    
    # The network core cannot access external flash directly. The flash simulator must be used to
    # provide a memory region that is used to forward the new firmware to the network core.
    CONFIG_FLASH_SIMULATOR=y
    CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
    CONFIG_FLASH_SIMULATOR_STATS=n
    
    # The following configurations are required to support serial recovery of the
    # network image
    CONFIG_PCD_APP=y
    
    CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
    
    CONFIG_MCUBOOT_INDICATION_LED=y
    
    # Increase flash space for MCUboot child image, to fit USB drivers
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x12000
    

Related