Skip to content

Commit 8688c4b

Browse files
quytranpzzthenguyenyf
authored andcommitted
boards: renesas: Add initial support for EK-RA4W1 board
Initial commit to support Renesas EK-RA4W1 board Signed-off-by: Quy Tran <[email protected]> Signed-off-by: Duy Phuong Hoang. Nguyen <[email protected]>
1 parent 893d699 commit 8688c4b

File tree

11 files changed

+299
-0
lines changed

11 files changed

+299
-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_RA4W1
5+
select SOC_R7FA4W1AD2CNG
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=R7FA4W1AD")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/renesas/ek_ra4w1/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_ra4w1
3+
vendor: renesas
4+
socs:
5+
- name: r7fa4w1ad2cng
31.8 KB
Loading
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
.. _ek_ra4w1:
2+
3+
RA4W1 Evaluation Kit
4+
####################
5+
6+
Overview
7+
********
8+
9+
The Renesas RA4W1 is the first Bluetooth® 5.0 Low Energy fully compliant with 2Mbit High-Throughput
10+
(HT) and Long Range support in a single chip MCU of Renesas RA4 product series for IoT applications
11+
that require a high-performance Arm® Cortex®-M4 core at a very attractive price point. The RA4W1 MCU
12+
has full function support for Bluetooth 5.0 Low Energy long-range and mesh networking, and provides
13+
excellent reception performance. RA4W1 is geared towards IoT application requiring Security, large
14+
embedded RAM and low power consumption.
15+
16+
**MCU Native Pin Access**
17+
- R7FA4W1AD2CNG
18+
- QFN-56 package
19+
- On-chip memory: 512-KB ROM, 96-KB RAM, 8-KB data flash memory
20+
21+
**Power-supply voltage**
22+
- USB connector: 5-V input
23+
- Power-supply IC: 5-V input, 3.3-V output
24+
- External power-supply header*1: 3.3-V input, 2 pins x 1
25+
26+
**Main clock**
27+
- Crystal oscillator (surface-mount technology (SMT)) for the main system clock
28+
- Crystal oscillator or ceramic resonator (lead type) for the main system clock
29+
30+
**Sub-clock**
31+
- Crystal oscillator (SMT) for the sub-clock
32+
33+
**Bluetooth Low Energy**
34+
- Bluetooth Low Energy (BLE) circuit x1
35+
- Range of frequency: 2402 to 2480 MHz
36+
- Maximum transmission output power: 4 dBm (in 4-dBm output mode)
37+
- Output variation: +2 dB
38+
39+
**Push switches**
40+
- Reset switch x 1
41+
- User switch x 1
42+
43+
**LED**
44+
- Power indicator: green x 1
45+
- User: green x 2
46+
- ACT LED: green x 1
47+
48+
**Conetivity**
49+
- Connector for an on-board emulator: USB Micro-B
50+
- Connector for a USB serial-conversion interface: USB Micro-B
51+
- Pmod™ connector: Angle type, 12 pins
52+
- Arduino™ UNO connectors
53+
54+
- Emulator reset switch
55+
56+
.. figure:: ek-ra4w1-board.webp
57+
:align: center
58+
:alt: RA4W1 Evaluation Kit
59+
60+
EK-RA4W1 Board Functional Area Definitions (Credit: Renesas Electronics Corporation)
61+
62+
Hardware
63+
********
64+
Detail Hardware feature for the RA4W1 MCU group can be found at `RA4W1 Group User's Manual Hardware`_
65+
66+
.. figure:: ra4w1-block-diagram.webp
67+
:width: 442px
68+
:align: center
69+
:alt: RA4W1 MCU group feature
70+
71+
RA4W1 Block diagram (Credit: Renesas Electronics Corporation)
72+
73+
Detail Hardware feature for the EK-RA4W1 MCU can be found at `EK-RA4W1 - User's Manual`_
74+
75+
Supported Features
76+
==================
77+
78+
The below features are currently supported on Zephyr OS for EK-RA4W1 board:
79+
80+
+-----------+------------+----------------------+
81+
| Interface | Controller | Driver/Component |
82+
+===========+============+======================+
83+
| GPIO | on-chip | gpio |
84+
+-----------+------------+----------------------+
85+
| MPU | on-chip | arch/arm |
86+
+-----------+------------+----------------------+
87+
| NVIC | on-chip | arch/arm |
88+
+-----------+------------+----------------------+
89+
| UART | on-chip | serial |
90+
+-----------+------------+----------------------+
91+
92+
Other hardware features are currently not supported by the port.
93+
94+
Programming and Debugging
95+
*************************
96+
97+
Applications for the ``ek_ra4w1`` board target configuration can be
98+
built, flashed, and debugged in the usual way. See
99+
:ref:`build_an_application` and :ref:`application_run` for more details on
100+
building and running.
101+
102+
Flashing
103+
========
104+
105+
Program can be flashed to EK-RA4W1 via the on-board SEGGER J-Link debugger.
106+
SEGGER J-link's drivers are avaialbe at https://www.segger.com/downloads/jlink/
107+
108+
To flash the program to board
109+
110+
1. Connect to J-Link OB via USB port to host PC
111+
112+
2. Make sure J-Link OB jumper is in default configuration as describe in `EK-RA4W1 - User's Manual`_
113+
114+
3. Execute west command
115+
116+
.. code-block:: console
117+
118+
west flash -r jlink
119+
120+
Debugging
121+
=========
122+
123+
You can use Segger Ozone (`Segger Ozone Download`_) for a visual debug interface
124+
125+
Once downloaded and installed, open Segger Ozone and configure the debug project
126+
like so:
127+
128+
* Target Device: R7FA4W1AD
129+
* Target Interface: SWD
130+
* Target Interface Speed: 4 MHz
131+
* Host Interface: USB
132+
* Program File: <path/to/your/build/zephyr.elf>
133+
134+
**Note:** It's verified that we can debug OK on Segger Ozone v3.30d so please use this or later
135+
version of Segger Ozone
136+
137+
References
138+
**********
139+
- `EK-RA4W1 Website`_
140+
- `RA4W1 MCU group Website`_
141+
142+
.. _EK-RA4W1 Website:
143+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra4w1-evaluation-kit-ra4w1-mcu-group
144+
145+
.. _RA4W1 MCU group Website:
146+
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra4w1-low-energy-single-chip-32-bit-microcontrollers-48mhz-bluetooth-50
147+
148+
.. _EK-RA4W1 - User's Manual:
149+
https://www.renesas.com/us/en/document/man/ek-ra4w1-users-manual
150+
151+
.. _RA4W1 Group User's Manual Hardware:
152+
https://www.renesas.com/us/en/document/man/renesas-ra4w1-group-users-manual-hardware
153+
154+
.. _Segger Ozone Download:
155+
https://www.segger.com/downloads/jlink#Ozone
57.8 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, 1, 1)>,
11+
<RA_PSEL(RA_PSEL_SCI_0, 1, 0)>;
12+
};
13+
};
14+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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/r7fa4w1ad2cng.dtsi>
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include "ek_ra4w1-pinctrl.dtsi"
11+
12+
/ {
13+
model = "Renesas EK-RA4W1";
14+
compatible = "renesas,ra4w1", "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 = <&ioport1 6 GPIO_ACTIVE_HIGH>;
27+
label = "LED1";
28+
};
29+
30+
led2: led2 {
31+
gpios = <&ioport4 4 GPIO_ACTIVE_HIGH>;
32+
label = "LED2";
33+
};
34+
};
35+
36+
aliases {
37+
led0 = &led1;
38+
};
39+
};
40+
41+
&subclk {
42+
status = "okay";
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+
&ioport1 {
56+
status = "okay";
57+
};
58+
59+
&ioport4 {
60+
status = "okay";
61+
};
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
identifier: ek_ra4w1
2+
name: Renesas EK-RA4W1
3+
type: mcu
4+
arch: arm
5+
ram: 96
6+
flash: 512
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=32000000
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)