• sales

    +86-0755-88291180

XIAO-RA4M1 User Guide

Introduction

        The XIAO RA4M1 integrates Renesas' RA4M1 chip (32-bit ARM® Cortex®-M4 MCU up to 48 MHz) into the classic XIAO form factor. This development board offers 256KB Flash, 32KB SRAM, 8KB EEPROM, a USB 2.0 connector, reset and boot buttons, 3 LEDs, a 14-bit A/D converter, a 12-bit D/A converter, and a CAN BUS interface. With onboard charging circuitry and low-power modes (as low as 45μA), it’s ideal for battery-powered applications. Sharing the same 32-bit R7FA4M1AB3CFM microcontroller as the Arduino Uno R4, it's natively compatible with Arduino IDE and the extensive XIAO accessories, making it the perfect starting point for electronics projects.


Features

    • Popular Microcontroller Onboard: Powered by Renesas RA4M1, an 32-bit ARM® Cortex®-M4 R7FA4M1AB3CFM MCU operating at up to 48 MHz, 256 KB of Flash memory, and 32 KB of SRAM.
    • Highlighted Onboard Resources: Equipped with a 14-bit ADC, 12-bit DAC, CAN BUS, USB 2.0, and an onboard RGB LED.
    • Expanded 8 New IOs: Adds 8 new IO pins on the back compared to previous XIAO boards (19 GPIOs in total), enabling more complex applications.
    • Powerful Security Features: Built-in hardware encryption, secure boot, key storage, and other functions to ensure application security.
    • Software Compatibility: Fully compatible with Arduino IDE for seamless project development and prototyping.
    • Efficient Power Design: Offers 4 operating modes with power consumption as low as 45μA in deep sleep, and supports lithium battery charge management.
    • Compact Thumb-Sized Design: Measuring 21 x 17.8mm, adopting Seeed Studio's classic XIAO form factor, ideal for space-conscious applications.
    • Production-Friendly: Surface Mount Device (SMD) design with all components on the front and stamp holes on both sides, facilitating efficient mass production.


    Specification



    Hardware Overview

            Before everything starts, it is quite essential to have some basic parameters of the product. The following table provides information about the characteristics of Seeed Studio XIAO RA4M1.



    Getting Started

    Hardware Preparation

    You need to prepare the following:


    Software Preparation

    The recommended programming tool for the XIAO RA4M1 is the Arduino IDE, so as part of the software preparation, you will need to complete the Arduino installation.

                                                                            • Step 1. Download and Install the stable version of Arduino IDE according to your operating system.
                                                                            • Step 2. Launch the Arduino application.
                                                                            • Step 3. Add RA4M1 board package to your Arduino IDE.
                                                                              • Navigate to File > Preferences, and fill "Additional Boards Manager URLs" with the url below: https://files.seeedstudio.com/arduino/package_renesas_1.2.0_index.json

                                                                              • Navigate to Tools > Board > Boards Manager..., type the keyword RA4M1 in the search box, select the latest version of Seeed Renesas Board, and install it.


                                                                            • Step 4. Select your board and port.
                                                                              • On top of the Arduino IDE, you can search for xiao in the development board on the left, select XIAO_RA4M1, and select the port directly.



                                                                            BootLoader Mode

                                                                            Sometimes, using the wrong program can cause the XIAO to lose its port or not function correctly. Common issues include:


                                                                                                            • The XIAO is connected to the computer, but no port number is found.
                                                                                                            • The XIAO is connected, and a port number appears, but the program upload fails.


                                                                                                            When you encounter the above two situations, you can try to put XIAO into BootLoader mode, which can solve most of the problems of unrecognized devices and failed uploads. The specific method is:


                                                                                                            • Method 1. Press and hold the BOOT button on the XIAO RA4M1 without releasing it.
                                                                                                            • Method 2. Keep the BOOT button pressed and then connect to the computer via the data cable. Release the BOOT button after connecting to the computer.


                                                                                                            Reset

                                                                                                            When the program runs abnormally, you can press Reset once during power-up to let XIAO re-execute the uploaded program. When you press and hold the BOOT key while powering up and then press the Reset key once, you can also enter BootLoader mode.


                                                                                                            Run your first Blink program

                                                                                                            By now, I believe you have a good understanding of the features and hardware of the XIAO RA4M1. Next, let's take the simplest Blink program as an example and perform the first blink for your XIAO RA4M1!


                                                                                                              • Step 1. Launch the Arduino application.
                                                                                                              • Step 2. Navigate to File > Examples > 01.Basics > Blink, open the program.

                                                                                                              • Step 3. Select the board model to XIAO RA4M1, and select the correct port number to upload the program.

                                                                                                              Once the program is successfully uploaded, you will see the following output message and you can observe that the orange LED on the right side of the XIAO RA4M1 is blinking.


                                                                                                              Congratulations, you've learned how to write and upload programs for the XIAO RA4M1!


                                                                                                              NOTE :The LED will only turn off when the user LED pin on the XIAO RA4M1 is set to a high level, and it will only turn on when the pin is set to a low level.



                                                                                                              Play with RGB LEDs


                                                                                                              The XIAO RA4M1 comes with a build-in RGB LED that you can control, follow is a example of how to smoothly change the LED color between red, green, and blue.


                                                                                                              • Step 1. Download the Adafruit_NeoPixel library

                                                                                                              Navigate to Sketch > Include Liarbry > Manage Libraries..., and search Adafruit_NeoPixel, install the lastest version.


                                                                                                              • Step 2. Copy following code to a new sketch:
                                                                                                              #include <Adafruit_NeoPixel.h>
                                                                                                              
                                                                                                              #define LED_PIN RGB_BUILTIN  // Define the pin for the built-in RGB LED
                                                                                                              #define NUM_PIXELS 1         // Number of WS2812 LEDs
                                                                                                              
                                                                                                              Adafruit_NeoPixel pixels(NUM_PIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);
                                                                                                              
                                                                                                              void setup() {
                                                                                                                pinMode(PIN_RGB_EN, OUTPUT); // Set up the power pin
                                                                                                                digitalWrite(PIN_RGB_EN, HIGH); //Turn on power to the LED
                                                                                                                pixels.begin();  // Initialize the NeoPixel library
                                                                                                              }
                                                                                                              
                                                                                                              void loop() {
                                                                                                                  // Transition from Red to Green
                                                                                                                for (int i = 0; i <= 255; i++) {
                                                                                                                  pixels.setPixelColor(0, pixels.Color(255 - i, i, 0));  // Red decreases, Green increases
                                                                                                                  pixels.show();
                                                                                                                  delay(10);  // Adjust delay for smoothness
                                                                                                                }
                                                                                                              
                                                                                                                // Transition from Green to Blue
                                                                                                                for (int i = 0; i <= 255; i++) {
                                                                                                                  pixels.setPixelColor(0, pixels.Color(0, 255 - i, i));  // Green decreases, Blue increases
                                                                                                                  pixels.show();
                                                                                                                  delay(10);  // Adjust delay for smoothness
                                                                                                                }
                                                                                                              
                                                                                                                // Transition from Blue to Red
                                                                                                                for (int i = 0; i <= 255; i++) {
                                                                                                                  pixels.setPixelColor(0, pixels.Color(i, 0, 255 - i));  // Blue decreases, Red increases
                                                                                                                  pixels.show();
                                                                                                                  delay(10);  // Adjust delay for smoothness
                                                                                                                }
                                                                                                              }
                                                                                                              

                                                                                                              • Step 3. Select the board model to XIAO RA4M1, and select the correct port number to upload the program.




                                                                                                              Resourse



                                                                                                              Troubleshooting

                                                                                                              Q1: What should I look for when soldering pins

                                                                                                              Due to the miniature size of XIAO RA4M1, please be careful when soldering headers, do not stick different pins together, and do not stick solder to the shield or other components. Otherwise, it may cause XIAO to short circuit or not work properly, and the consequences caused by this will be borne by the user.


                                                                                                              Support

                                                                                                              Monday-Friday (9:30-6:30) Saturday (9:30-5:30)

                                                                                                              Mobile: +86  13434470212

                                                                                                              Email: services01@spotpear.com