I used SDK v2.6.2 with the nRF7002 DK kit.i used mcu boot secondary with external flash.
I was able to perform OTA using the nRF Connect app, but after resetting the DK kit, it reverts to the older firmware. How can I resolve this issue?
I used SDK v2.6.2 with the nRF7002 DK kit.i used mcu boot secondary with external flash.
I was able to perform OTA using the nRF Connect app, but after resetting the DK kit, it reverts to the older firmware. How can I resolve this issue?
Hi,
Are you calling boot_write_img_confirmed() in your new application?
https://github.com/nrfconnect/sdk-nrf/blob/v2.9.0/samples/cellular/smp_svr/src/main.c#L32
Kind regards,
Håkon
No, I didn't call boot_write_img_confirmed()
.
Is there any specific reason to call boot_write_img_confirmed()
?
Hi,
This is for the new application to be able to run a self-test before confirming that the OTA image is indeed working as it should. If this is not run, it will revert to the old image.
Kind regards,
Håkon
Hi,
I add boot_write_img_confirmed() and problem is solve,
thanks for your support.
Glad to hear that this helped. Hope you have a wonderful day!
Kind regards,
Håkon
when i do the OTA after the NVS flash memory is erase so how i can solve this problem
Hi,
Did you use a static partition layout?
ie. do you have a pm_static.yml file in your application folder?
If not, you can copy it from build-folder/partitions.yml to ../pm_static.yml
Kind regards,
Håkon
Hi,
Did you use a static partition layout?
ie. do you have a pm_static.yml file in your application folder?
If not, you can copy it from build-folder/partitions.yml to ../pm_static.yml
Kind regards,
Håkon
Yes i used pm_static.yml file below is my partition and i used nvs_storage:
but when do the ota then which data i store in NVS flash was erase.
using of below i init the nvs
below is pm_static.yml partition
EMPTY_0:
address: 0xfe000
end_address: 0x100000
placement:
after:
- settings_storage
region: flash_primary
size: 0x2000
app:
address: 0x10200
end_address: 0xfc000
region: flash_primary
size: 0xebe00
external_flash:
address: 0xec000
end_address: 0x800000
region: external_flash
size: 0x714000
mcuboot:
address: 0x0
end_address: 0x10000
placement:
before:
- mcuboot_primary
region: flash_primary
size: 0x10000
mcuboot_pad:
address: 0x10000
end_address: 0x10200
placement:
before:
- mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x10000
end_address: 0xfc000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
size: 0xec000
span: *id001
mcuboot_primary_app:
address: 0x10200
end_address: 0xfc000
orig_span: &id002
- app
region: flash_primary
size: 0xebe00
span: *id002
mcuboot_secondary:
address: 0x0
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0xec000
placement:
align:
start: 0x4
region: external_flash
share_size:
- mcuboot_primary
size: 0xec000
otp:
address: 0xff8100
end_address: 0xff83fc
region: otp
size: 0x2fc
rpmsg_nrf53_sram:
address: 0x20070000
end_address: 0x20080000
placement:
before:
- end
region: sram_primary
size: 0x10000
nvs_storage:
address: 0xfa000
end_address: 0xfc000
placement:
before:
- settings_storage
region: flash_primary
size: 0x2000 # 8KB reserved for NVS
share_size:
- settings_storage # Prevents overlap with settings
settings_storage:
address: 0xfc000
end_address: 0xfe000
placement:
align:
start: 0x4000
before:
- end
region: flash_primary
size: 0x2000
sram_primary:
address: 0x20000000
end_address: 0x20070000
region: sram_primary
size: 0x70000
Hello,
Thank you for sharing the updated partition layout.
Could you share a log from the process, to verify that the address mapping of nvs is detected correctly in both builds.
I am not sure what happens in your case, but if the settings_storage is detected as "nvs_storage" and vice-versa, the issues will be that the overwrite each other.
If that is the case on your side, you can look at this thread: Setting and using NVS and BT Settings with Static Partition Manager
Kind regards,
Håkon