Skip to content

Commit 482d76a

Browse files
committed
boards: arm: add initial support for Renesas EK-RA4M1
The EK-RA4M1 is a basic development board for the Renesas RA4M1 Microcontroller. The board contains J-Link on board, a user LED and push button and several headers for interfacing with external devices. Signed-off-by: Ian Morris <[email protected]>
1 parent 18ee2aa commit 482d76a

File tree

8 files changed

+228
-0
lines changed

8 files changed

+228
-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 Ian Morris
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_EK_RA4M1
5+
select SOC_R7FA4M1AB3CFP
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Ian Morris
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(pyocd "--target=r7fa4m1ab")
5+
6+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

boards/renesas/ek_ra4m1/board.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Ian Morris
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board:
5+
name: ek_ra4m1
6+
vendor: renesas
7+
socs:
8+
- name: r7fa4m1ab3cfp
81.9 KB
Loading
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.. _renesas_ek_ra4m1:
2+
3+
Renesas EK-RA4M1
4+
################
5+
6+
Overview
7+
********
8+
9+
The Renesas EK-RA4M1 development board contains a Renesas Cortex-M4 based
10+
R7FA4M1AB3CFP Microcontroller operating at up to 48 MHz with 256 KB of Flash
11+
memory and 32 KB of SRAM.
12+
13+
.. figure:: img/renesas_ek_ra4m1.jpg
14+
:align: center
15+
:alt: Renesas EK-RA4M1
16+
17+
EK-RA4M1 (Credit: Courtesy of Renesas Electronics Corporation)
18+
19+
Hardware
20+
********
21+
22+
The EK-RA4M1 board contains two USB connectors, a user LED, a push
23+
button and a reset button. It has J-Link onboard and two PMOD sockets for
24+
interfacing with external electronics. For more information about the
25+
evalutation kit board see the `Renesas EK-RA4M1 website`_.
26+
27+
Supported Features
28+
==================
29+
30+
The Zephyr Renesas EK-RA4M1 configuration supports the following hardware
31+
features:
32+
33+
+-----------+------------+-------------------------------------+
34+
| Interface | Controller | Driver/Component |
35+
+===========+============+=====================================+
36+
| NVIC | on-chip | nested vector interrupt controller |
37+
+-----------+------------+-------------------------------------+
38+
| UART | on-chip | serial port-polling; |
39+
| | | serial port-interrupt |
40+
+-----------+------------+-------------------------------------+
41+
| PINMUX | on-chip | pinmux |
42+
+-----------+------------+-------------------------------------+
43+
| GPIO | on-chip | GPIO output |
44+
| | | GPIO input |
45+
+-----------+------------+-------------------------------------+
46+
47+
Other hardware features have not been enabled yet for this board.
48+
49+
The default configuration can be found in the defconfig file:
50+
:zephyr_file:`boards/renesas/ek_ra4m1/ek_ra4m1_defconfig`.
51+
52+
Programming and debugging
53+
*************************
54+
55+
Building & Flashing
56+
===================
57+
58+
You can build and flash an application in the usual way (See
59+
:ref:`build_an_application` and
60+
:ref:`application_run` for more details).
61+
62+
Here is an example for building and flashing the :zephyr:code-sample:`blinky` application.
63+
64+
.. zephyr-app-commands::
65+
:zephyr-app: samples/basic/blinky
66+
:board: ek_ra4m1
67+
:goals: build flash
68+
69+
Debugging
70+
=========
71+
72+
Debugging also can be done in the usual way.
73+
The following command is debugging the :zephyr:code-sample:`blinky` application.
74+
Also, see the instructions specific to the debug server that you use.
75+
76+
.. zephyr-app-commands::
77+
:zephyr-app: samples/basic/blinky
78+
:board: ek_ra4m1
79+
:maybe-skip-config:
80+
:goals: debug
81+
82+
References
83+
**********
84+
85+
.. target-notes::
86+
87+
.. _Renesas EK-RA4M1 website: https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4m1-evaluation-kit-ra4m1-mcu-group
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/*
2+
* Copyright (c) 2024 Ian Morris
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <renesas/ra/r7fa4m1ab3cfp.dtsi>
9+
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-r7fa4m1xxxxxx.h>
10+
#include <zephyr/dt-bindings/gpio/gpio.h>
11+
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
13+
/ {
14+
model = "Renesas EK-RA4M1";
15+
compatible = "renesas,r7fa4m1ab3cfp";
16+
17+
chosen {
18+
zephyr,console = &uart1;
19+
zephyr,shell-uart = &uart1;
20+
zephyr,sram = &sram0;
21+
zephyr,flash = &flash0;
22+
};
23+
24+
leds {
25+
compatible = "gpio-leds";
26+
ld1: led_1 {
27+
gpios = <&ioport1 6 GPIO_ACTIVE_HIGH>;
28+
label = "User LED";
29+
};
30+
};
31+
32+
buttons {
33+
compatible = "gpio-keys";
34+
button1: button_1 {
35+
gpios = <&ioport1 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
36+
label = "User Push Button";
37+
zephyr,code = <INPUT_KEY_0>;
38+
};
39+
};
40+
41+
aliases {
42+
led0 = &ld1;
43+
sw0 = &button1;
44+
};
45+
};
46+
47+
&pinctrl {
48+
sci1_default: sci1_default {
49+
group1 {
50+
pinmux = <P401_TXD1>, <P402_RXD1>;
51+
};
52+
};
53+
};
54+
55+
&sci1 {
56+
status = "okay";
57+
pinctrl-0 = <&sci1_default>;
58+
pinctrl-names = "default";
59+
uart1: uart {
60+
current-speed = <115200>;
61+
status = "okay";
62+
};
63+
};
64+
65+
&ioport1 {
66+
status = "okay";
67+
};
68+
69+
&fcu {
70+
status = "okay";
71+
};
72+
73+
&mosc {
74+
status = "okay";
75+
clock-frequency = <12000000>;
76+
};
77+
78+
&cgc {
79+
clock-source = <&mosc>;
80+
iclk-div = <1>;
81+
pclka-div = <1>;
82+
pclkb-div = <2>;
83+
pclkc-div = <1>;
84+
pclkd-div = <1>;
85+
fclk-div = <2>;
86+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
identifier: ek_ra4m1
2+
name: Renesas EK-RA4M1
3+
vendor: renesas
4+
type: mcu
5+
arch: arm
6+
toolchain:
7+
- zephyr
8+
- gnuarmemb
9+
- xtools
10+
ram: 32
11+
flash: 256
12+
supported:
13+
- gpio
14+
- uart
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2024 Ian Morris
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12000000
5+
6+
CONFIG_BUILD_OUTPUT_HEX=y
7+
8+
# enable uart driver
9+
CONFIG_SERIAL=y
10+
11+
# enable console
12+
CONFIG_CONSOLE=y
13+
CONFIG_UART_CONSOLE=y
14+
15+
# enable GPIO
16+
CONFIG_GPIO=y
17+
18+
# enable pin controller
19+
CONFIG_PINCTRL=y
20+
21+
# enable Clocks
22+
CONFIG_CLOCK_CONTROL=y

0 commit comments

Comments
 (0)