The swap algorithm is executed every time the device is powered on, and the swap type is "perm".

Hello, 

We use nrf54l15dk + MX25R8035F external flash to do the matter development on NCS2.9.0, and we meet some problems:

1. when the matter.ota is 1003KB, takes about 10min30s to get the new fw, and 3min18s to do the swap algorithm, is it a normal speed?

2. The swap algorithm is executed every time the device is powered on, and the swap type is "perm". Following is my log:

Parents Reply Children
  • For JDEC ID,I have solved the problem by adding 

    Have you cut the solder bridges connecting the MX25R64 on the development kit so you could use the same pins to connect to the MX25R8035F instead?

    It looks like if the mcuboot swap type is BOOT_SWAP_TYPE_TEST, it will return (we use nrf54l15), not excute boot_write_img_confirmed(). Is this ok?

    The log says the swap is 'perm' which indicates that the image has been confirmed already. I.e. it will not be reverted.

  • when i set CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE=y and

    CONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS="--confirm", the swap is perm.

    Here is my newest test log, I don't use CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE and CONFIG_MCUBOOT_EXTRA_IMGTOOL_ARGS:
    1. thread dfu ok, excute swap test algorithm, in the app code confirm the fw:

    2. reboot, It will excute the swap algorithm again:
    3. every time I do the power off and power on, it will do the swap test and switch the fw with v400 and v401, did my pm_static.yml config wrong?
  • It seems like the bootloader fails to erase the image trailer for the secondary slot during the swap. Have you also tested the same with the on-board mx25r64 flash IC?

  • I test dfu thread nrf54l15dk(mx25r64), at least ble ota works well, and now, I am using our customized board with MX25R8035F , then this problem occurred.

    I also tried ble ota with this customized board, same problem, like you said, seems like the bootloader fails to erase the image trailer for the secondary slot during the swap, so always excute swap action.

  • I see. I thought you were testing on the nRF54L15 DK. Do you have logging from the custom board? It would help if we could view the logs from the bootloader. 

    You can enable CONFIG_MCUBOOT_LOG_LEVEL_DBG in the bootloader configuration to increase the log level.

    Example of what your mcuboot configuration overlay may look like:

    <project root>/sysbuild/mcuboot.conf

    CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=20
    CONFIG_MULTITHREADING=y
    CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
    CONFIG_SPI_NOR=y
    CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
    CONFIG_BOOT_MAX_IMG_SECTORS=512
    CONFIG_MCUBOOT_LOG_LEVEL_DBG=y

Related