Tool/software:
Good afternoon,
I'm working on a OAD on chip project with the CC2340R5 chip.
My application consists of :
-MCUboot Bootloader
-Persistent Application
-User Application
I want to invalidate my application and went back to Persistent Application to create a new application for the mobile application.
What's the procedure for this?
I understand that the example used the following solution:
Status_t SwUpdate_RevokeImage(uint8 imageSlot)
{
Status_t status = FLASH_SUCCESS;
struct image_header emptyHeader = {0};
status = flash_open();
if(INT_PRIMARY_SLOT == imageSlot)
{
writeFlash(HDR_OFFSET, (uint8_t *)&(emptyHeader),sizeof(pSwUpdateModuleGlobalData->primaryHdr));
}
flash_close();
return (status);
}
so I tried implementing this function in my code and restarting my chip. On restart, my application restarted in my User Application without switching back to the persitent app.
Have I misunderstood how to do this? Is there another solution? Is there anything else I need to do?
Yohan,
Regards