Hello,
I am using EK-RA2E1 board with device R7FA2E1A92DFM.
I am trying to boot the application using UART and xmodem.
I have set the baudrate at 115200 bps at both the (primary and secondary) applications (usng swap upgrade mode) and teraterm is connected at 115200 bps. (see the images below).
Attaching the clock settings below too.
But I see weird characters printed on TeraTerm (see image below).
I tried the same with 9600 bps too but same output.
Thank You.
Thanks for reaching out Renesas Engineering Community!
Have you tried to put a logic analyzer in TX pin of the MCU to check if the messages are transmitted with no garbage?
Also could you please share with us some code to check how you print these messages to Tera Term?
Best Regards,
IK
Hi,
This is the menu to be printed on Teraterm :
Hi, I am not able to send mesage. Can you send me a ping so that i can send you the zip file?
Thank You
Hello Keniz,
According to the application note here:
https://www.renesas.com/us/en/document/apn/ra6-secure-firmware-update-using-mcuboot-and-flash-dual-bank-application-project
And the example projects for Firmware update through UART for RA6M4:
https://github.com/renesas/ra-fsp-examples/tree/master/application_projects/r11an0570/example_projects_with_bootloader
I have created for you an example for EK-RA2L1 to take it as reference.
In the .zip folder I will attach for you it is included the bootloader project using swap upgrade mode as you would like to use and 2 application projects.
The one is the app_primary_uart_ra2l1 including also a downloader thread to perform firmware update through a USB to UART and by using XMODEM via Tera Term.
As soon as I open the Tera Term I connect to serial port and make the settings according to my UART setting in the app_primary_uart_ra2l1 project.
And then run the project. I see these messages printed on Tera Term.
If I press 1 in the provided menu I see image slot information.
Then I press 2 to transfer my file through XMODEM:
I choose the bin.signed file of my app_secondary_uart_ra2l1 project:
And I can see the file being tranfered:
As soon is completed I see a message saying that we should wait while the system is resetting
And the as soon as the reset is done I can see again the same menu being displayed but now from app_secondary_uart_ra2l1 project image loaded in my board.
And if I press 1 again to display the image slot info, I get:
I read now the swapped memory layout.
MCUBOOT_UART_XMODEM_RA2L1.zip
Hope this project will help you proceed.
Thank you!
Thank You !
After using your code, still the problem persists.
Kind Regards,
Keniz
Hi Keniz,
Could you specify to me the USB to UART converter you are using? Have you tried to create a simple UART project to print data on Tera Term and check how these messages are transmitted?
Also I suppose that you tested the example on RA2E1 is that correct?
Thanks!
I am using USB-UART-Wandler, CP2102 USB Serial Converter https://www.amazon.de/UART-Wandler-Adapter-serielle-Schnittstelle-Converter-Anschlussleitung/dp/B0773G2K92/ref=sxin_14_pa_sp_search_thematic_sspa?content-id=amzn1.sym.7c214396-db8c-4c02-beb0-17fd63a8828c%3Aamzn1.sym.7c214396-db8c-4c02-beb0-17fd63a8828c&crid=2F13MG2C0RJM7&cv_ct_cx=cp2102+usb+zu+ttl+konverter&keywords=cp2102+usb+zu+ttl+konverter&pd_rd_i=B0773G2K92&pd_rd_r=8b40c70b-70b9-43c9-bf80-0fb95b1e3aa9&pd_rd_w=N2tDp&pd_rd_wg=9R3n3&pf_rd_p=7c214396-db8c-4c02-beb0-17fd63a8828c&pf_rd_r=5W8DS53PW8XP867FG61D&qid=1707382951&sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&sprefix=cp2102+%2Caps%2C116&sr=1-4-6e6ea531-5af4-4866-af75-1ef299d1c279-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9zZWFyY2hfdGhlbWF0aWM&psc=1
I am presently running different project using this converter at 115200 baudrate. (without mcuboot/bootloader). It works perfectly fine.
Keniz Gandhi
As discussed in private try to put a logic analyzer to see how the messages are transmitted through the MCU side. If the messages are OK, try to use an other USB to UART converter.
Okay, will do that and get back to you.
I managed to create the UART bootloader for RA2E1, which performs firmware update through XMODEM by using Tera Term.
Let me give you some more information.
I have created an initial bootloader project with MCU boot which is using the Swap Upgrade Mode.
The project is called ra2e1_bootloader you will find it in the .zip folder I have attached for you.
I also have two different applications the ra2e1_app_primary and the ra2e1_app_secondary application.
The first application as soon as it loads it turns on a LED on pin P015 of RA2E1 and prints the available information from the menu for the downloader that has been developed and uses the XMODEM to load later the secondary application.
The Serial Port is configured in Tera Term to work also in 115200 bps.
As soon as I load the ra2e1_app_primary application project, I see:
I see that the menu is displayed and if I press 1 I get the image slot information. And the led on pin P015 turns on.
As soon as I press 2, I see that I can load through XMODEM my new application.
And as soon as the file is transferred, I see the message that I should wait until the system is resetting and after reset the image from ra2e1_app_secondary is loaded.
I see that user LED2 turns on, which is configured in the code of the secondary application and if I press 1 again in the menu I see:
I read the swapped memory layout again.
All projects are baremetal as you requested.
MCUBOOT_UART_XMODEM_RA2E1_BAREMETAL.zip
In case you are still facing issues with the way the characters are printed on your serial terminal, please let me inform you that there is nothing more that we can do for you, since the project as you can see works with no issues for us.
Test the code without making any modifications, please.
Thanks for your cooperation!
IK_Renesas
Thanks alot ! It works !