Hi post following the forum topic: (1) R7FA2L1A92DFM: Programming connector - MD pin and RES pin related query. - Forum - RA MCU - Renesas Engineering Community
I did understand the MD (P201) is a boot mode selector pin that when set to GND and MCU reset results in SCI or USB boot mode selection. Here are my queries (Could not reply back in the same thread).
1. If JTAG/SWD Pins are disabled by the user still, can we enter boot mode to upload binary?
2. What determines if Boot mode will come up as SCI mode or USB-CDC mode as I want to fix the mode to USB-CDC?
3. Does Renesas has any flashing tool for PC or any python script that helps in uploading the binary to the flash via USB-CDC so that we do not need to develop such a tool as on a high level I understood that programming is not a simple UART we need to make boot loader understandable packets, seems a tedious job?
4. I see that the on board JLink circuit connects MD pin as well may I know what is the reason for it? Does SWD/JTAG has any dependency on that pin?
5. Where is the bootloader code stored in the flash? Is it part of the memory map? Can any way that part of the code be modified by JTAG?
Hello,
1. RA4M2 supports 2 interfaces for boot mode: USB or SCI. JTAG/SWD interface is not supported for serial programming so the device can use either USB or SCI.
2. When JTAG/SWD communication is not selected or not supported (as on RA4M2), the device waits for 0x00 to be received. If 00h is received continuously for 3 bytes in either 2-wire UART communication or USB communication, “ACK” is transmitted. (* data is received until the communication mode is determined). Check section 4.6 at https://www.renesas.com/us/en/document/apn/standard-boot-firmware-ra-family-mcus-based-arm-cortex-m33
3. Renesas Flash Programmer is the tool that supports boot mode for all operations with serial programming. You can download it from:
https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui
4. The on-board J-Link debugger can handle the MD pin automatically to enter boot mode and use the SCI pins for serial programming.
5. The SCI boot program and USB boot program are stored in the boot area of MCU and cannot be modified by JTAG.