Skip to content

Commit 5663c88

Browse files
quytranpzznashif
authored andcommitted
boards: renesas: Add initial support for EK-RA4E2 board
Initial commit to support Renesas EK-RA4E2 board Signed-off-by: Quy Tran <[email protected]> Signed-off-by: Duy Phuong Hoang. Nguyen <[email protected]>
1 parent 81b8390 commit 5663c88

File tree

11 files changed

+325
-0
lines changed

11 files changed

+325
-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_RA4E2
5+
select SOC_R7FA4E2B93CFM
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=R7FA4E2B9")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/renesas/ek_ra4e2/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_ra4e2
3+
vendor: renesas
4+
socs:
5+
- name: r7fa4e2b93cfm
21.8 KB
Loading
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
.. _ek_ra4e2:
2+
3+
RA4E2 Evaluation Kit
4+
####################
5+
6+
Overview
7+
********
8+
9+
The RA4E2 Group delivers up to 100 MHz of CPU performance using an Arm® Cortex®-M33 core
10+
with 128 KB of code flash memory, 4 KB of data flash memory, and 40 KB of SRAM. RA4E2 MCUs
11+
offer high-performance and optimized peripheral functions along with the smallest package
12+
options, including space-saving 36-pin BGA and 32-pin QFN packages. The RA4E2
13+
Group offers a wide set of peripherals, including USB Full Speed, CANFD, I3C, and ADC.
14+
15+
The MCU in this series incorporates a high-performance Arm Cortex®-M33 core running up to
16+
100 MHz with the following features:
17+
18+
**MCU Native Pin Access**
19+
- R7FA4E2B93CFM MCU (referred to as RA MCU)
20+
- 100 MHz, Arm® Cortex®-M33 core
21+
- 128 kB Code Flash, 40 kB SRAM
22+
- 64 pins, LQFP package
23+
- Native pin access through 2 x 14-pin and 1 x 40-pin male headers
24+
- MCU current measurement points for precision current consumption measurement
25+
- Multiple clock sources - RA MCU oscillator and sub-clock oscillator crystals, providing precision
26+
20.000 MHz and 32,768 Hz reference clock. Additional low-precision clocks are available internal to the
27+
RA MCU
28+
29+
**System Control and Ecosystem Access**
30+
- USB Full Speed Device (micro-AB connector)
31+
- Three 5 V input sources
32+
33+
- USB (Debug, Full Speed)
34+
- External power supply (using surface mount clamp test points and J31 through holes)
35+
36+
- Three Debug modes
37+
38+
- Debug on-board (SWD)
39+
- Debug in (SWD)
40+
- Debug out (JTAG, SWD)
41+
42+
- User LEDs and buttons
43+
44+
- Three User LEDs (red, blue, green)
45+
- Power LED (white) indicating availability of regulated power
46+
- Debug LED (yellow) indicating the debug connection
47+
- Two User buttons
48+
- One Reset button
49+
50+
- Five most popular ecosystems expansions
51+
52+
- 2 Seeed Grove® system (I3C/Analog) connectors
53+
- SparkFun® Qwiic® connector
54+
- 2 Digilent PmodTM (SPI and UART) connectors
55+
- ArduinoTM (Uno R3) connector
56+
- MikroElektronikaTM mikroBUS connector
57+
58+
- MCU boot configuration jumper
59+
60+
**Special Feature Access**
61+
62+
- CAN FD (3-pin header)
63+
64+
.. figure:: ek-ra4e2-board.webp
65+
:align: center
66+
:alt: RA4E2 Evaluation Kit
67+
68+
EK-RA4E2 Board Functional Area Definitions (Credit: Renesas Electronics Corporation)
69+
70+
Hardware
71+
********
72+
Detail Hardware feature for the RA4E2 MCU group can be found at `RA4E2 Group User's Manual Hardware`_
73+
74+
.. figure:: ra4e2-block-diagram.webp
75+
:width: 442px
76+
:align: center
77+
:alt: RA4E2 MCU group feature
78+
79+
RA4E2 Block diagram (Credit: Renesas Electronics Corporation)
80+
81+
Detail Hardware feature for the EK-RA4E2 MCU can be found at `EK-RA4E2 - User's Manual`_
82+
83+
Supported Features
84+
==================
85+
86+
The below features are currently supported on Zephyr OS for EK-RA4E2 board:
87+
88+
+-----------+------------+----------------------+
89+
| Interface | Controller | Driver/Component |
90+
+===========+============+======================+
91+
| GPIO | on-chip | gpio |
92+
+-----------+------------+----------------------+
93+
| MPU | on-chip | arch/arm |
94+
+-----------+------------+----------------------+
95+
| NVIC | on-chip | arch/arm |
96+
+-----------+------------+----------------------+
97+
| UART | on-chip | serial |
98+
+-----------+------------+----------------------+
99+
100+
Other hardware features are currently not supported by the port.
101+
102+
Programming and Debugging
103+
*************************
104+
105+
Applications for the ``ek_ra4e2`` board target configuration can be
106+
built, flashed, and debugged in the usual way. See
107+
:ref:`build_an_application` and :ref:`application_run` for more details on
108+
building and running.
109+
110+
Flashing
111+
========
112+
113+
Program can be flashed to EK-RA4E2 via the on-board SEGGER J-Link debugger.
114+
SEGGER J-link's drivers are avaialbe at https://www.segger.com/downloads/jlink/
115+
116+
To flash the program to board
117+
118+
1. Connect to J-Link OB via USB port to host PC
119+
120+
2. Make sure J-Link OB jumper is in default configuration as describe in `EK-RA4E2 - User's Manual`_
121+
122+
3. Execute west command
123+
124+
.. code-block:: console
125+
126+
west flash -r jlink
127+
128+
Debugging
129+
=========
130+
131+
You can use Segger Ozone (`Segger Ozone Download`_) for a visual debug interface
132+
133+
Once downloaded and installed, open Segger Ozone and configure the debug project
134+
like so:
135+
136+
* Target Device: R7FA4E2B9
137+
* Target Interface: SWD
138+
* Target Interface Speed: 4 MHz
139+
* Host Interface: USB
140+
* Program File: <path/to/your/build/zephyr.elf>
141+
142+
**Note:** It's verified that we can debug OK on Segger Ozone v3.30d so please use this or later
143+
version of Segger Ozone
144+
145+
References
146+
**********
147+
- `EK-RA4E2 Website`_
148+
- `RA4E2 MCU group Website`_
149+
150+
.. _EK-RA4E2 Website:
151+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4e2-evaluation-kit-ra4e2-mcu-group
152+
153+
.. _RA4E2 MCU group Website:
154+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra4e2-entry-line-100mhz-arm-cortex-m33-general-purpose-microcontroller
155+
156+
.. _EK-RA4E2 - User's Manual:
157+
https://www.renesas.com/us/en/document/mat/ek-ra4e2-v1-users-manual
158+
159+
.. _RA4E2 Group User's Manual Hardware:
160+
https://www.renesas.com/us/en/document/mah/ra4e2-group-users-manual-hardware
161+
162+
.. _Segger Ozone Download:
163+
https://www.segger.com/downloads/jlink#Ozone
44.6 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: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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/ra4/r7fa4e2b93cfm.dtsi>
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include "ek_ra4e2-pinctrl.dtsi"
11+
12+
/ {
13+
model = "Renesas EK-RA4E2";
14+
compatible = "renesas,ra4e2", "renesas,ra";
15+
16+
chosen {
17+
zephyr,sram = &sram0;
18+
zephyr,flash = &flash0;
19+
zephyr,console = &uart0;
20+
zephyr,shell-uart = &uart0;
21+
};
22+
23+
leds {
24+
compatible = "gpio-leds";
25+
led1: led1 {
26+
gpios = <&ioport2 7 GPIO_ACTIVE_HIGH>;
27+
label = "LED1";
28+
};
29+
led2: led2 {
30+
gpios = <&ioport1 4 GPIO_ACTIVE_HIGH>;
31+
label = "LED2";
32+
};
33+
led3: led3 {
34+
gpios = <&ioport1 12 GPIO_ACTIVE_HIGH>;
35+
label = "LED3";
36+
};
37+
};
38+
39+
aliases {
40+
led0 = &led1;
41+
};
42+
};
43+
44+
&xtal {
45+
clock-frequency = <DT_FREQ_M(20)>;
46+
mosel = <0>;
47+
#clock-cells = <0>;
48+
status = "okay";
49+
};
50+
51+
&subclk {
52+
status = "okay";
53+
};
54+
55+
&pll {
56+
source = <RA_PLL_SOURCE_MAIN_OSC>;
57+
div = <RA_PLL_DIV_1>;
58+
mul = <10 0>;
59+
freq = <DT_FREQ_M(200)>;
60+
status = "okay";
61+
};
62+
63+
&sci0 {
64+
pinctrl-0 = <&sci0_default>;
65+
pinctrl-names = "default";
66+
status = "okay";
67+
uart0: uart {
68+
current-speed = <115200>;
69+
status = "okay";
70+
};
71+
};
72+
73+
&ioport1 {
74+
status = "okay";
75+
};
76+
77+
&ioport2 {
78+
status = "okay";
79+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
identifier: ek_ra4e2
2+
name: Renesas EK-RA4E2
3+
type: mcu
4+
arch: arm
5+
ram: 40
6+
flash: 128
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- gpio
12+
- uart
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=100000000
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_UART_CONSOLE=y
14+
CONFIG_CONSOLE=y
15+
16+
CONFIG_BUILD_OUTPUT_HEX=y
17+
CONFIG_BUILD_NO_GAP_FILL=y

0 commit comments

Comments
 (0)