Switch factory partition after OTA

TibiTheToz
Posts: 1
Joined: Wed Jun 12, 2024 7:47 am

Switch factory partition after OTA

Postby TibiTheToz » Wed Oct 09, 2024 9:26 am

Hi,

I have released products into the wild wich have an OTA procedure availible with the factory, ota_0 & ota_1 partition type.

The initial factory partition has some bugs that we get rid of in the new version. After a successful OTA I want to switch
the factory partition the the new one (or the boot pointer) because in case of a reset factory, I don't want to reset to the original
buggy factory partition.

After reading documentation, I'm still not sure how to proceed.

How would you implement that ? And what are the things to be careful about ?

Thanks for your answers.

T.

mikemoy
Posts: 625
Joined: Fri Jan 12, 2018 9:10 pm

Re: Switch factory partition after OTA

Postby mikemoy » Thu Oct 10, 2024 11:38 am

Have you looked into

esp_ota_get_next_update_partition();
and
esp_ota_set_boot_partition();

Or you could just send another OTA update so that both your ota_0 & ota_1 partitions have the same good new code.

Who is online

Users browsing this forum: Cimby1, Google [Bot], Majestic-12 [Bot] and 118 guests