RA6M3 firmware update, reboot from image 1 after the second MCU restart

Hello,

I am working on the EK-RA6M3, I have a project that's working fine performing FW update through UART using XMODEM,

I am using the swap bootloader example project as is didn't change anything,

And then I created 2 bare metal blinky projects and configure them to use the bootloader,

And set the same configuration and copied the same code from the bare metal example in the following forum thread :

https://community.renesas.com/mcu-mpu/ra/f/forum/33230/ra2e1-weird-characters-printed-on-serial-terminal

As I already mentioned the project is working as expected but I have 2 problems:

- After updating the firmware the MCU reboots from image 2 (as expected) but on the next restart the MCU reboots from image 1 again.

- After updating the firmware, I am unable to redo the firmware update from image 2, when trying to erase the secondary slot I am getting err = FSP_ERR_CMD_LOCKED, (FCU is in locked state, typically as a result of attempting to Erase an area that is protected by an Access Window)

I believe I am missing something here,

Can you please help me with these two problems,

Best regards,

Abdo

Parents
  • Hello Abdo,

    Can you please send us your project in order to be able to replicate your issue exactly?

    Thank you!

    Best Regards,

    IK

  • Hello again,

    I found a mistake that I made in the flash module configuration of the second app (testBlink2), I was not enabling code flash programming,

    The following problem is SOLVED: - After updating the firmware, I am unable to redo the firmware update from image 2, when trying to erase the secondary slot I am getting err = FSP_ERR_CMD_LOCKED, (FCU is in locked state, typically as a result of attempting to Erase an area that is protected by an Access Window)

    Now I can do firmware update for both applications.

    BUT I still have the first problem remaining :

    - After updating the firmware the MCU reboots from image 2 (as expected) but on the next restart(or if I press reset button right after the update)the MCU reboots from image 1 again

    Best regards,

    Abdo

  • Hello Abdo,

    After taking a quick look on your project, I saw that in test blink2 project you haven't enabled the timer overflow interrupt, please go to the stack properties and change these settings also as shown below:

    Best Regards,

    IK

  • Hello, 

    Perfect, thank you 

    Also I found something i was doing wrong is that the bootloader custom property was --pad and should be --confirm since i am using swap upgrade method,

    Now the project is working well!

    Thank you for your support,

    Best regards,

    Abdo

Reply Children