XIAO RA4M1 Serial Port Not Recognized

Hello

I am having trouble with my XIAO RA4M1. Can anyone give me some advice?

I was attempting to create a PlatformIO configuration for the XIAO RA4M1. As a result of my efforts, I managed to successfully upload code, but the serial port is no longer recognized.

I tried Method 1 and Method 2 from the Wiki, but I couldn’t enter bootloader mode.

I also tried the method mentioned in the text “hold the BOOT key while powering up and then press the Reset key once”. This made a serial port that seemed to be in bootloader mode appear. However, when I checked the Board Info in Arduino IDE 2.3.3, the VID and PID were different from those in normal mode. As a result, the serial port number is also different from when in normal mode.

BN: Unknown board
VID: 0x045B
PID: 0x0261
SN: (null)

When I try to upload to this serial port, I get the following error with dfu-util:

No DFU capable USB device available

Using Renesas Flash Programmer, I tried writing the following bootloader to the above serial port:

C:\Users\YourUsername\AppData\Local\Arduino15\packages\Seeeduino\hardware\renesas_uno\1.2.0\bootloaders\XIAORA4M1\dfu_RA4M1.hex

After writing the bootloader and resetting, the normal mode serial port still does not appear.

When I tried the same on another normal RA4M1, the results were the same when I tried the above Method 1 and 2, and reset while holding the BOOT button. Furthermore, when I put it into bootloader mode by resetting while holding BOOT and uploaded the bootloader, the serial port no longer appeared.

From this state, what operations are necessary to make the serial port appear again? Please let me know.

Just ran into the same issue…

You need to custom_hwids.py with this:

Import(“env”)
board_config = env.BoardConfig()
board_config.update(“build.hwids”, [
[“0x2886”, “0x0049”]
])

Then this is my complete platformio.ini that works:

[platformio]
include_dir = ./inc
default_envs = XIAORA4M1
[env:XIAORA4M1]
platform = renesas-ra
extra_scripts = pre:custom_hwids.py
; change microcontroller
board_build.mcu = ra4m1
; change MCU frequency
board_build.f_cpu = 48000000L
platform_packages =
toolchain-gccarmnoneeabi @ 1.120301.0
;needed for higher CPP version to be able to use named initializers for structs
board = uno_r4_minima
upload_protocol=dfu
lib_deps =
monitor_speed = 115200
framework = arduino
build_flags =
${env.build_flags}
-Wextra

I also undef the pin definitions for the UNO and replaced them them with the ones from the Xiao RA4M1 Arduino core.

1 Like