Skip to content

Commit 7c67fa1

Browse files
duynguyenxanashif
authored andcommitted
boards: renesas: Initial support Renesas EK-RA6M2 board
- Initial support for EK-RA6M2 board Signed-off-by: Duy Phuong Hoang. Nguyen <[email protected]>
1 parent 5f53861 commit 7c67fa1

File tree

11 files changed

+308
-0
lines changed

11 files changed

+308
-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_RA6M2
5+
select SOC_R7FA6M2AF3CFB
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=R7FA6M2AF")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/renesas/ek_ra6m2/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_ra6m2
3+
vendor: renesas
4+
socs:
5+
- name: r7fa6m2af3cfb
79.8 KB
Loading
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
.. _ek_ra6m2:
2+
3+
RA6M2 Evaluation Kit
4+
####################
5+
6+
Overview
7+
********
8+
9+
The Renesas RA6M2 microcontroller is the entry point to the Renesas RA6 product series
10+
for applications that require a high-performance Arm® Cortex®-M4 core at a very attractive
11+
price point. The RA6M2 is suitable for IoT applications requiring security, large embedded
12+
RAM and low power consumption.
13+
14+
The key features of the EK-RA6M2 board are categorized in three groups as follow:
15+
16+
**MCU Native Pin Access**
17+
18+
- 120MHz Arm Cortex-M4 based RA6M2 MCU in 144 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 - RA6M2 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 RA6M2 MCU
24+
25+
**System Control and Ecosystem Access**
26+
27+
- USB Full Speed device
28+
- 5V input through USB debug
29+
30+
- Three Debug modes
31+
32+
- Debug on-board (SWD)
33+
- Debug in (SWD and JTAG)
34+
- Debug out (SWD)
35+
36+
- User LEDs and buttons
37+
38+
- One User LEDs
39+
- One User buttons
40+
- One Reset button
41+
42+
- Three most popular ecosystems expansions
43+
44+
- Two Digilent Pmod (SPI and UART) connectors
45+
- Arduino (Uno R3) connector
46+
- MikroElektronika mikroBUS connector
47+
48+
- MCU boot configuration jumper
49+
50+
**Special Feature Access**
51+
52+
- USB Full Speed Host and Device (micro-AB connector)
53+
54+
.. figure:: ek-ra6m2-board.webp
55+
:align: center
56+
:alt: RA6M2 Evaluation Kit
57+
58+
EK-RA6M2 Board Functional Area Definitions (Credit: Renesas Electronics Corporation)
59+
60+
Hardware
61+
********
62+
Detailed hardware feature for the RA6M2 MCU group can be found at `RA6M2 Group User's Manual Hardware`_
63+
64+
.. figure:: ra6m2-block-diagram.webp
65+
:width: 871px
66+
:align: center
67+
:alt: RA6M2 MCU group feature
68+
69+
RA6M2 Block diagram (Credit: Renesas Electronics Corporation)
70+
71+
Detailed hardware feature for the EK-RA6M2 MCU can be found at `EK-RA6M2 - User's Manual`_
72+
73+
Supported Features
74+
==================
75+
76+
The below features are currently supported on Zephyr OS for EK-RA6M2 board:
77+
78+
+-----------+------------+----------------------+
79+
| Interface | Controller | Driver/Component |
80+
+===========+============+======================+
81+
| GPIO | on-chip | gpio |
82+
+-----------+------------+----------------------+
83+
| MPU | on-chip | arch/arm |
84+
+-----------+------------+----------------------+
85+
| NVIC | on-chip | arch/arm |
86+
+-----------+------------+----------------------+
87+
| UART | on-chip | serial |
88+
+-----------+------------+----------------------+
89+
90+
Other hardware features are currently not supported by the port.
91+
92+
Programming and Debugging
93+
*************************
94+
95+
Applications for the ``ek_ra6m2`` board target configuration can be
96+
built, flashed, and debugged in the usual way. See
97+
:ref:`build_an_application` and :ref:`application_run` for more details on
98+
building and running.
99+
100+
Flashing
101+
========
102+
103+
Program can be flashed to EK-RA6M2 via the on-board SEGGER J-Link debugger.
104+
SEGGER J-link's drivers are avaialbe at https://www.segger.com/downloads/jlink/
105+
106+
To flash the program to board
107+
108+
1. Connect to J-Link OB via USB port to host PC
109+
110+
2. Make sure J-Link OB jumper is in default configuration as describe in `EK-RA6M2 - User's Manual`_
111+
112+
3. Execute west command
113+
114+
.. code-block:: console
115+
116+
west flash -r jlink
117+
118+
Debugging
119+
=========
120+
121+
You can use Segger Ozone (`Segger Ozone Download`_) for a visual debug interface
122+
123+
Once downloaded and installed, open Segger Ozone and configure the debug project
124+
like so:
125+
126+
* Target Device: R7FA6M2AD
127+
* Target Interface: SWD
128+
* Target Interface Speed: 4 MHz
129+
* Host Interface: USB
130+
* Program File: <path/to/your/build/zephyr.elf>
131+
132+
**Note:** It's verified that we can debug OK on Segger Ozone v3.30d so please use this or later
133+
version of Segger Ozone
134+
135+
References
136+
**********
137+
- `EK-RA6M2 Website`_
138+
- `RA6M2 MCU group Website`_
139+
140+
.. _EK-RA6M2 Website:
141+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m2-evaluation-kit-ra6m2-mcu-group
142+
143+
.. _RA6M2 MCU group Website:
144+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra6m2-32-bit-microcontrollers-120mhz-medium-size-memory-integration-and-ethernet
145+
146+
.. _EK-RA6M2 - User's Manual:
147+
https://www.renesas.com/us/en/document/mat/ek-ra6m2-v1-users-manual-0
148+
149+
.. _RA6M2 Group User's Manual Hardware:
150+
https://www.renesas.com/us/en/document/mah/renesas-ra6m2-group-users-manual-hardware
151+
152+
.. _Segger Ozone Download:
153+
https://www.segger.com/downloads/jlink#Ozone
87.2 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+
sci7_default: sci7_default {
8+
group1 {
9+
/* tx rx */
10+
psels = <RA_PSEL(RA_PSEL_SCI_7, 4, 1)>,
11+
<RA_PSEL(RA_PSEL_SCI_7, 4, 2)>;
12+
};
13+
};
14+
};
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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/r7fa6m2af3cfb.dtsi>
9+
#include <dt-bindings/gpio/gpio.h>
10+
11+
#include "ek_ra6m2-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Renesas EK-RA6M2";
15+
compatible = "renesas,ra6m2", "renesas,ra";
16+
17+
chosen {
18+
zephyr,sram = &sram0;
19+
zephyr,flash = &flash0;
20+
zephyr,console = &uart7;
21+
zephyr,shell-uart = &uart7;
22+
};
23+
24+
leds {
25+
compatible = "gpio-leds";
26+
led1: led1 {
27+
gpios = <&ioport1 6 GPIO_ACTIVE_HIGH>;
28+
label = "LED1";
29+
};
30+
};
31+
32+
aliases {
33+
led0 = &led1;
34+
};
35+
};
36+
37+
&sci7 {
38+
pinctrl-0 = <&sci7_default>;
39+
pinctrl-names = "default";
40+
status = "okay";
41+
uart7: uart {
42+
current-speed = <115200>;
43+
status = "okay";
44+
};
45+
};
46+
47+
&ioport1 {
48+
status = "okay";
49+
};
50+
51+
&xtal {
52+
clock-frequency = <DT_FREQ_M(12)>;
53+
mosel = <0>;
54+
#clock-cells = <0>;
55+
status = "okay";
56+
};
57+
58+
&subclk {
59+
status = "okay";
60+
};
61+
62+
&pll {
63+
source = <RA_PLL_SOURCE_MAIN_OSC>;
64+
div = <RA_PLL_DIV_1>;
65+
mul = <20 0>;
66+
status = "okay";
67+
};
68+
69+
&pclka {
70+
clk_src = <RA_CLOCK_SOURCE_PLL>;
71+
clk_div = <RA_SCI_CLOCK_DIV_2>;
72+
status = "okay";
73+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
identifier: ek_ra6m2
2+
name: Renesas EK-RA6M2
3+
type: mcu
4+
arch: arm
5+
ram: 384
6+
flash: 1024
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+
CONFIG_BUILD_OUTPUT_HEX=y
11+
CONFIG_BUILD_NO_GAP_FILL=y
12+
13+
# Enable Console
14+
CONFIG_SERIAL=y
15+
CONFIG_UART_CONSOLE=y
16+
CONFIG_UART_INTERRUPT_DRIVEN=y
17+
CONFIG_CONSOLE=y

0 commit comments

Comments
 (0)