Skip to content

Commit f80e5dc

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

File tree

11 files changed

+330
-0
lines changed

11 files changed

+330
-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_RA6M4
5+
select SOC_R7FA6M4AF3CFB
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=R7FA6M4AF")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

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