Skip to content

Commit 2dfb265

Browse files
duynguyenxaquytranpzz
authored andcommitted
boards: renesas: Add initial support Renesas EK-RA6M3 board
Initial commit to support EK-RA6M3 board Signed-off-by: Duy Phuong Hoang. Nguyen <[email protected]> Signed-off-by: default avatarQuy Tran <[email protected]>
1 parent 5d22d03 commit 2dfb265

File tree

11 files changed

+323
-0
lines changed

11 files changed

+323
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_EK_RA6M3
5+
select SOC_R7FA6M3AH3CFC
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=R7FA6M3AH")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/renesas/ek_ra6m3/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: ek_ra6m3
3+
vendor: renesas
4+
socs:
5+
- name: r7fa6m3ah3cfc
50.8 KB
Loading
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
.. _ek_ra6m3:
2+
3+
RA6M3 Evaluation Kit
4+
####################
5+
6+
Overview
7+
********
8+
9+
The Renesas RA6M3 group uses the high-performance Arm® Cortex®-M4 core and
10+
offers a TFT controller with 2D accelerator and JPEG decoder. The RA6M3 is
11+
suitable for IoT applications requiring TFT, Ethernet, security, large
12+
embedded RAM, and USB High Speed (HS).
13+
14+
The key features of the EK-RA6M3 board are categorized in three groups as follow:
15+
16+
**MCU Native Pin Access**
17+
18+
- 120MHz Arm Cortex-M4 based RA6M3 MCU in 176 pins, LQFP package
19+
- Native pin access through 4 x 40-pin male headers
20+
- MCU and USB current measurement points for precision current consumption measurement
21+
- Multiple clock sources - RA6M3 MCU oscillator and sub-clock oscillator crystals,
22+
providing precision 24.000 MHz and 32,768 Hz reference clock.
23+
Additional low precision clocks are avaialbe internal to the RA6M3 MCU
24+
25+
**System Control and Ecosystem Access**
26+
27+
- USB Full Speed Host and Device (micro AB connector)
28+
- Four 5V input sources
29+
30+
- USB (Debug, Full Speed, High Speed)
31+
- External power supply (using surface mount clamp test points and power input vias)
32+
33+
- Three Debug modes
34+
35+
- Debug on-board (SWD)
36+
- Debug in (ETM, SWD and JTAG)
37+
- Debug out (SWD)
38+
39+
- User LEDs and buttons
40+
41+
- Three User LEDs (red, blue, green)
42+
- Power LED (white) indicating availability of regulated power
43+
- Debug LED (yellow) indicating the debug connection
44+
- Two User buttons
45+
- One Reset button
46+
47+
- Four most popular ecosystems expansions
48+
49+
- Two Seeed Grove system (I2C) connectors
50+
- Two Digilent Pmod (SPI and UART) connectors
51+
- Arduino (Uno R3) connector
52+
- MikroElektronika mikroBUS connector
53+
54+
- MCU boot configuration jumper
55+
56+
**Special Feature Access**
57+
58+
- Ethernet (RJ45 RMII interface)
59+
- USB High Speed Host and Device (micro-AB connector)
60+
- 32 Mb (256 Mb) External Quad-SPI Flash
61+
62+
.. figure:: ek-ra6m3-board.webp
63+
:align: center
64+
:alt: RA6M3 Evaluation Kit
65+
66+
EK-RA6M3 Board Functional Area Definitions (Credit: Renesas Electronics Corporation)
67+
68+
Hardware
69+
********
70+
Detailed hardware feature for the RA6M3 MCU group can be found at `RA6M3 Group User's Manual Hardware`_
71+
72+
.. figure:: ra6m3-block-diagram.webp
73+
:width: 442px
74+
:align: center
75+
:alt: RA6M3 MCU group feature
76+
77+
RA6M3 Block diagram (Credit: Renesas Electronics Corporation)
78+
79+
Detail hardware feature for the EK-RA6M3 MCU can be found at `EK-RA6M3 - User's Manual`_
80+
81+
Supported Features
82+
==================
83+
84+
The below features are currently supported on Zephyr OS for EK-RA6M3 board:
85+
86+
+-----------+------------+----------------------+
87+
| Interface | Controller | Driver/Component |
88+
+===========+============+======================+
89+
| GPIO | on-chip | gpio |
90+
+-----------+------------+----------------------+
91+
| MPU | on-chip | arch/arm |
92+
+-----------+------------+----------------------+
93+
| NVIC | on-chip | arch/arm |
94+
+-----------+------------+----------------------+
95+
| UART | on-chip | serial |
96+
+-----------+------------+----------------------+
97+
98+
Other hardware features are currently not supported by the port.
99+
100+
Programming and Debugging
101+
*************************
102+
103+
Applications for the ``ek_ra6m3`` board target configuration can be
104+
built, flashed, and debugged in the usual way. See
105+
:ref:`build_an_application` and :ref:`application_run` for more details on
106+
building and running.
107+
108+
Flashing
109+
========
110+
111+
Program can be flashed to EK-RA6M3 via the on-board SEGGER J-Link debugger.
112+
SEGGER J-link's drivers are avaialbe at https://www.segger.com/downloads/jlink/
113+
114+
To flash the program to board
115+
116+
1. Connect to J-Link OB via USB port to host PC
117+
118+
2. Make sure J-Link OB jumper is in default configuration as describe in `EK-RA6M3 - User's Manual`_
119+
120+
3. Execute west command
121+
122+
.. code-block:: console
123+
124+
west flash -r jlink
125+
126+
Debugging
127+
=========
128+
129+
You can use Segger Ozone (`Segger Ozone Download`_) for a visual debug interface
130+
131+
Once downloaded and installed, open Segger Ozone and configure the debug project
132+
like so:
133+
134+
* Target Device: R7FA6M3AH
135+
* Target Interface: SWD
136+
* Target Interface Speed: 4 MHz
137+
* Host Interface: USB
138+
* Program File: <path/to/your/build/zephyr.elf>
139+
140+
**Note:** It's verified that we can debug OK on Segger Ozone v3.30d so please use this or later
141+
version of Segger Ozone
142+
143+
References
144+
**********
145+
- `EK-RA6M3 Website`_
146+
- `RA6M3 MCU group Website`_
147+
148+
.. _EK-RA6M3 Website:
149+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m3-evaluation-kit-ra6m3-mcu-group
150+
151+
.. _RA6M3 MCU group Website:
152+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra6m3-32-bit-microcontrollers-120mhz-usb-high-speed-ethernet-and-tft-controller
153+
154+
.. _EK-RA6M3 - User's Manual:
155+
https://www.renesas.com/us/en/document/mat/ek-ra6m3-v1-users-manual
156+
157+
.. _RA6M3 Group User's Manual Hardware:
158+
https://www.renesas.com/us/en/document/mah/ra6m3-group-users-manual-hardware
159+
160+
.. _Segger Ozone Download:
161+
https://www.segger.com/downloads/jlink#Ozone
44.9 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&pinctrl {
7+
sci8_default: sci8_default {
8+
group1 {
9+
/* tx rx */
10+
psels = <RA_PSEL(RA_PSEL_SCI_8, 1, 5)>,
11+
<RA_PSEL(RA_PSEL_SCI_8, 1, 4)>;
12+
};
13+
};
14+
};
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include <renesas/ra/ra6/r7fa6m3ah3cfc.dtsi>
9+
#include <dt-bindings/gpio/gpio.h>
10+
11+
#include "ek_ra6m3-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Renesas EK-RA6M3";
15+
compatible = "renesas,ra6m3", "renesas,ra";
16+
17+
chosen {
18+
zephyr,sram = &sram0;
19+
zephyr,console = &uart8;
20+
zephyr,shell-uart = &uart8;
21+
zephyr,flash = &flash0;
22+
};
23+
24+
leds {
25+
compatible = "gpio-leds";
26+
led1: led1 {
27+
gpios = <&ioport4 3 GPIO_ACTIVE_HIGH>;
28+
label = "LED1";
29+
};
30+
led2: led2 {
31+
gpios = <&ioport4 0 GPIO_ACTIVE_HIGH>;
32+
label = "LED2";
33+
};
34+
led3: led3 {
35+
gpios = <&ioport1 0 GPIO_ACTIVE_HIGH>;
36+
label = "LED3";
37+
};
38+
};
39+
40+
aliases {
41+
led0 = &led1;
42+
};
43+
};
44+
45+
&ioport1 {
46+
status = "okay";
47+
};
48+
49+
&ioport4 {
50+
status = "okay";
51+
};
52+
53+
&sci8 {
54+
pinctrl-0 = <&sci8_default>;
55+
pinctrl-names = "default";
56+
status = "okay";
57+
uart8: uart {
58+
current-speed = <115200>;
59+
status = "okay";
60+
};
61+
};
62+
63+
&xtal {
64+
clock-frequency = <DT_FREQ_M(24)>;
65+
mosel = <0>;
66+
#clock-cells = <0>;
67+
status = "okay";
68+
};
69+
70+
&subclk {
71+
status = "okay";
72+
};
73+
74+
&pll {
75+
source = <RA_PLL_SOURCE_MAIN_OSC>;
76+
div = <RA_PLL_DIV_2>;
77+
mul = <20 0>;
78+
freq = <DT_FREQ_M(240)>;
79+
status = "okay";
80+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
identifier: ek_ra6m3
2+
name: Renesas EK-RA6M3
3+
type: mcu
4+
arch: arm
5+
ram: 640
6+
flash: 2048
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- gpio
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
5+
6+
# Enable GPIO
7+
CONFIG_GPIO=y
8+
CONFIG_PINCTRL=y
9+
10+
# Enable Console
11+
CONFIG_SERIAL=y
12+
CONFIG_UART_INTERRUPT_DRIVEN=y
13+
CONFIG_CONSOLE=y
14+
CONFIG_UART_CONSOLE=y
15+
16+
CONFIG_BUILD_OUTPUT_HEX=y
17+
CONFIG_BUILD_NO_GAP_FILL=y

0 commit comments

Comments
 (0)