Skip to content

Commit e0c892f

Browse files
soburihenrikbrixandersen
authored andcommitted
boards: arm: Add initial support for EKRA2A1
Add support for the EK-RA2A1 board. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 0877b3a commit e0c892f

File tree

8 files changed

+233
-0
lines changed

8 files changed

+233
-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 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_EK_RA2A1
5+
select SOC_R7FA2A1AB3CFM
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2024 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=R7FA2A1AB")
5+
6+
board_runner_args(pyocd "--target=r7fa2a1ab")
7+
8+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

boards/renesas/ek_ra2a1/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_ra2a1
3+
vendor: renesas
4+
socs:
5+
- name: r7fa2a1ab3cfm
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
.. _ek_ra2a1:
2+
3+
RA2A1 Evaluation Kit
4+
####################
5+
6+
Overview
7+
********
8+
9+
The EK-RA2A1 is an evaluation kit for Renesas RA2A1 Microcontroller Group.
10+
11+
Renesas RA2A1 Microcontroller Group has following features
12+
13+
- 48MHz, Arm Cortex-M23 core
14+
- 256kB Code Flash, 8kB Data Flash, 32kB SRAM
15+
- USB 2.0 Full-Sppeed
16+
- SCI x 3
17+
- SPI x 2
18+
- I2C x 2
19+
- CAN x 1
20+
- 16-bit A/D Converter
21+
- 24-bit Sigma-Delta A/D Converter
22+
- 12-bit D/A Converter
23+
- 8-bit D/A Converter x 2
24+
- High-Speed Analog Comparator
25+
- Low-Power Analog Comparator
26+
- OPAMP x 3
27+
- Temperature Sensor
28+
- General PWM Timer 32-bit x 1
29+
- General PWM Timer 16-bit x 6
30+
- Low Power Asynchronous General-Purpose Timer x 2
31+
- Watchdog Timer
32+
- 49 Input/Output pins
33+
34+
Hardware
35+
********
36+
37+
EK-RA2A1 has following features.
38+
39+
- Native pin access through 4x 40-pin male headers
40+
- MCU current measurement points
41+
- SEGGER J-Link on-board programmer and debugger
42+
- Two Digilent Pmod (SPI and UART)
43+
- User LED
44+
- Mechanical user button
45+
- Capacitive user button
46+
47+
Supported Features
48+
==================
49+
50+
The Renesas EK-RA2A1 board configuration supports the following
51+
hardware features:
52+
53+
+-----------+------------+-------------------------------+
54+
| Interface | Controller | Driver/components |
55+
+===========+============+===============================+
56+
| PINCTRL | on-chip | pinctrl |
57+
+-----------+------------+-------------------------------+
58+
| CLOCK | on-chip | clock_control |
59+
+-----------+------------+-------------------------------+
60+
| GPIO | on-chip | gpio |
61+
+-----------+------------+-------------------------------+
62+
| UART | on-chip | uart |
63+
+-----------+------------+-------------------------------+
64+
65+
The default configuration can be found in
66+
:zephyr_file:`boards/renesas/ek_ra2a1/ek_ra2a1_defconfig`
67+
68+
69+
Programming and debugging
70+
*************************
71+
72+
Building & Flashing
73+
===================
74+
75+
You can build and flash an application with onboard J-Link debug adapter.
76+
:ref:`build_an_application` and
77+
:ref:`application_run` for more details).
78+
79+
Here is an example for building and flashing the :zephyr:code-sample:`blinky` application.
80+
81+
.. zephyr-app-commands::
82+
:zephyr-app: samples/basic/blinky
83+
:board: ek_ra2a1
84+
:goals: build flash
85+
86+
87+
Debugging
88+
=========
89+
90+
Debugging also can be done with onboard J-Link debug adapter.
91+
The following command is debugging the :zephyr:code-sample:`blinky` application.
92+
Also, see the instructions specific to the debug server that you use.
93+
94+
.. zephyr-app-commands::
95+
:zephyr-app: samples/basic/blinky
96+
:board: ek_ra2a1
97+
:maybe-skip-config:
98+
:goals: debug
99+
100+
101+
References
102+
**********
103+
104+
.. EK-RA2A1 Web site:
105+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra2a1-evaluation-kit-ra2a1-mcu-group
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
sci0_default: sci0_default {
9+
group1 {
10+
/* rx */
11+
psels = <RA_PSEL(RA_PSEL_SCI_0, 3, 1)>;
12+
};
13+
group2 {
14+
/* tx */
15+
psels = <RA_PSEL(RA_PSEL_SCI_0, 3, 2)>;
16+
drive-strength = "medium";
17+
};
18+
};
19+
};
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include <renesas/ra/ra2/r7fa2a1ab3cfm.dtsi>
9+
#include <zephyr/dt-bindings/gpio/gpio.h>
10+
11+
#include "ek_ra2a1-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Renesas EK-RA2A1";
15+
compatible = "renesas,ra2a1", "renesas,ra2";
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 = <&ioport2 5 GPIO_ACTIVE_HIGH>;
28+
label = "LED1";
29+
};
30+
};
31+
32+
aliases {
33+
led0 = &led1;
34+
};
35+
};
36+
37+
&xtal {
38+
clock-frequency = <DT_FREQ_M(12)>;
39+
mosel = <0>;
40+
#clock-cells = <0>;
41+
status = "okay";
42+
};
43+
44+
&subclk {
45+
status = "okay";
46+
};
47+
48+
&ioport2 {
49+
status = "okay";
50+
};
51+
52+
&sci0 {
53+
pinctrl-0 = <&sci0_default>;
54+
pinctrl-names = "default";
55+
status = "okay";
56+
uart0: uart {
57+
current-speed = <115200>;
58+
status = "okay";
59+
};
60+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
identifier: ek_ra2a1
2+
name: Renesas EK-RA2A1
3+
type: mcu
4+
arch: arm
5+
ram: 32
6+
flash: 256
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
supported:
11+
- gpio
12+
- uart
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (c) 2024 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
5+
6+
# Enable GPIO
7+
CONFIG_GPIO=y
8+
CONFIG_PINCTRL=y
9+
10+
# Enable Console
11+
CONFIG_SERIAL=y
12+
CONFIG_UART_CONSOLE=y
13+
CONFIG_UART_INTERRUPT_DRIVEN=y
14+
CONFIG_CONSOLE=y
15+
16+
CONFIG_BUILD_OUTPUT_HEX=y
17+
CONFIG_BUILD_NO_GAP_FILL=y
18+
CONFIG_CLOCK_CONTROL=y

0 commit comments

Comments
 (0)