When OTA,how do i not erase WFlash?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_3749826
Level 1
Level 1

When using cysmart to bootload,it erase WFlash.

I have modified the   bootload_user.c of CE216767.

pastedImage_0.png

But when update firmware by windows cysmart,it occurred error.However,the new firmware has been updated successfully and the wflash has not been erased.

Now where I should modifity?

0 Likes
1 Solution

To avoid erasing WFlash during OTA, you need modify the bootloader/app0 code to discard the data segment covering address 0x14000000 – 0x14008000, instead of modifying CySmart source code.

BTW, if there is no WFlash space involved in new application, the original data of WFlash programmed into device would not be touched even after a new OTA/DFU process. If there is WFlash space involved in your new application, what's the motivation to reserve the previous WFlash data? just curious.

View solution in original post

0 Likes
5 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

Can you clarify your issue with more details?

Generally, the WFlash would not be erased if there is no WFlash space allocated in application firmware. If there is WFlash space is occupied and allocated in application, e.g. EERPOM/BLE component, to reserve the original WFlash content seems not make sense. Can you tell the reason to do it?

BTW, the basic bootloader code example now has update - https://www.cypress.com/documentation/code-examples/ce213903-psoc-6-mcu-basic-device-firmware-update...

Please change to use the newest one.

0 Likes

When the power goes out, i want to save some data.

0 Likes

The WFlash is emulated by NV flash. The content would not be lost even power goes out.

0 Likes

But after DFU,the wflash has been erased.I do not want it to be erased.So I want to know what needs to be modified to not erase wflash in cysmart.I see that in psoc programmer can choose not to erase wflash.

0 Likes

To avoid erasing WFlash during OTA, you need modify the bootloader/app0 code to discard the data segment covering address 0x14000000 – 0x14008000, instead of modifying CySmart source code.

BTW, if there is no WFlash space involved in new application, the original data of WFlash programmed into device would not be touched even after a new OTA/DFU process. If there is WFlash space involved in your new application, what's the motivation to reserve the previous WFlash data? just curious.

0 Likes