Hi
I am trying to test the RA6 MCU Advanced Secure Bootloader Design using MCUboot and Code Flash Dualbank Mode example code (firmware update through USB) on the EK-RA6M4 board using FSP 5.4.0.
Downloaded the code and followed instructions to configure and compile the code.
After initial flash erase, I am able to load the primary code and execute. Able to check version info and also able to update the firmware to the secondary image.
The code restarts and shows the updated firmware. But when I try to execute the update again the terminal shows erasing flash, but nothing happens after that. I have used the example codes as is.
On further debugging the code so that it shows Erase success, but it fails at blank check and get the following error FLASH_RESULT_NOT_BLANK. Modified code a bit to print the message
I have tried even by creating fresh projects as per the application note, but still the same issue. First update works, but second update fails with Flash not blank error.
Please let me know if there are any modifications to be done in the code or configuration settings.
Regards
Sai Ram
Hello Sai,
Thanks for reaching out Renesas Engineering Community.
As far I can understand you are using these project with usb from our github repo.
Could you please confirm?
Best Regards,
IK
I had used the import option in e2studio and selected sample projects
code looks same like in github
Hi Sai,
I can replicate your problem both on RA6M4 and RA2L1, I believe that is a bug of the application note because the project is built for demonstration of bootloader function and not fully consider the ability of multiple updates.
For now the only solution is to erase all the chips and update again. I will escalate this problem to internal team and if I got any feedback I will reply to you.
BR,
NP_Renesas
Thank you for the update. But is this an issue with app note project or with the FSP flash erase api
Sai Ram M
I believe it's an issue with app note.
Is there any app note or example for code flash erase, so that i can try to modify the code based on that
You can refer to FSP flash driver documentation:
https://renesas.github.io/fsp/group___f_l_a_s_h___h_p.html
or the EK-RA6M4 flash driver example project:
github.com/.../flash_hp_ek_ra6m4_ep
Thank you will see if I can use this
You were right, the issue seems to be with the app project. I realised all the blocks were not getting erased. One block short. So I modified the code and now able to erase successfully