-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: arm: Add initial support for EKRA2A1
Add support for the EK-RA2A1 board. Signed-off-by: TOKITA Hiroshi <[email protected]>
- Loading branch information
Showing
8 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2024 TOKITA Hiroshi | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_EK_RA2A1 | ||
select SOC_R7FA2A1AB3CFM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2024 TOKITA Hiroshi | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(jlink "--device=R7FA2A1AB") | ||
|
||
board_runner_args(pyocd "--target=r7fa2a1ab") | ||
|
||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
board: | ||
name: ek_ra2a1 | ||
vendor: renesas | ||
socs: | ||
- name: r7fa2a1ab3cfm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
.. _ek_ra2a1: | ||
|
||
EK-RA2A1 | ||
######## | ||
|
||
Overview | ||
******** | ||
|
||
The EK-RA2A1 is a evaluation kit for Renesas RA2A1 SoC. | ||
|
||
Renesas RA2A1 SoC has following features. | ||
|
||
- 48MHz, Arm Cortex-M23 core | ||
- 256kB Code Flash, 8kB Data Flash, 32kB SRAM | ||
- USB 2.0 Full-Sppeed | ||
- UART x 3 | ||
- SPI x 2 | ||
- I2C x 2 | ||
- CAN x 1 | ||
- 16-bit A/D Converter | ||
- 24-bit Sigma-Delta A/D Converter | ||
- 12-bit D/A Converter | ||
- 8-bit D/A Converter x 2 | ||
- High-Speed Analog Comparator | ||
- Low-Power Analog Comparator | ||
- OPAMP x 3 | ||
- Temperature Sensor | ||
- 32-bit Timer x 1 | ||
- 16-bit Timer x 6 | ||
- Asynchronous General-Purpose Timer x 2 | ||
- Watchdog Timer | ||
- 49 Input/Output pins | ||
|
||
Hardware | ||
******** | ||
|
||
EK-RA2A1 has following features. | ||
|
||
- Native pin access through 4x 40-pin male headers | ||
- MCU current measurement points | ||
- SEGGER J-Link on-board programmer and debugger | ||
- Two Digilent Pmod (SPI and UART) | ||
- User LED | ||
- Mechanical user button | ||
- Capacitive user button | ||
|
||
Supported Features | ||
================== | ||
|
||
The Renesas EK-RA2A1 board configuration supports the following | ||
hardware features: | ||
|
||
+-----------+------------+-------------------------------+ | ||
| Interface | Controller | Driver/components | | ||
+===========+============+===============================+ | ||
| PINCTRL | on-chip | pinctrl | | ||
+-----------+------------+-------------------------------+ | ||
| CLOCK | on-chip | clock_control | | ||
+-----------+------------+-------------------------------+ | ||
| GPIO | on-chip | gpio | | ||
+-----------+------------+-------------------------------+ | ||
| UART | on-chip | uart | | ||
+-----------+------------+-------------------------------+ | ||
|
||
The default configuration can be found in | ||
:zephyr_file:`boards/renesas/ek_ra2a1/ek_ra2a17_defconfig` | ||
|
||
|
||
Programming and debugging | ||
************************* | ||
|
||
Building & Flashing | ||
=================== | ||
|
||
You can build and flash an application with onboard J-Link debug adapter. | ||
:ref:`build_an_application` and | ||
:ref:`application_run` for more details). | ||
|
||
Here is an example for building and flashing the :zephyr:code-sample:`blinky` application. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/blinky | ||
:board: ek_ra2a1 | ||
:goals: build flash | ||
|
||
|
||
Debugging | ||
========= | ||
|
||
Debugging also can be done with onboard J-Link debug adapter. | ||
The following command is debugging the :zephyr:code-sample:`blinky` application. | ||
Also, see the instructions specific to the debug server that you use. | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/blinky | ||
:board: ek_ra2a1 | ||
:maybe-skip-config: | ||
:goals: debug | ||
|
||
|
||
References | ||
********** | ||
|
||
.. EK-RA2A1 Web site: | ||
https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra2a1-evaluation-kit-ra2a1-mcu-group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright (c) 2024 TOKITA Hiroshi | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pinctrl { | ||
sci0_default: sci0_default { | ||
group1 { | ||
/* tx */ | ||
psels = <RA_PSEL(RA_PSEL_SCI_0, 3, 1)>; | ||
drive-strength = "medium"; | ||
}; | ||
group2 { | ||
/* rx */ | ||
psels = <RA_PSEL(RA_PSEL_SCI_0, 3, 2)>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2024 TOKITA Hiroshi | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <renesas/ra/ra2/r7fa2a1ab3cfm.dtsi> | ||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
||
#include "ek_ra2a1-pinctrl.dtsi" | ||
|
||
/ { | ||
model = "Renesas EK-RA2A1"; | ||
compatible = "renesas,ra2a1", "renesas,ra2"; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
led1: led1 { | ||
gpios = <&ioport2 5 GPIO_ACTIVE_HIGH>; | ||
label = "LED1"; | ||
}; | ||
}; | ||
|
||
aliases { | ||
led0 = &led1; | ||
}; | ||
}; | ||
|
||
&xtal { | ||
clock-frequency = <DT_FREQ_M(12)>; | ||
mosel = <0>; | ||
#clock-cells = <0>; | ||
status = "okay"; | ||
}; | ||
|
||
&subclk { | ||
status = "okay"; | ||
}; | ||
|
||
&ioport2 { | ||
status = "okay"; | ||
}; | ||
|
||
&sci0 { | ||
pinctrl-0 = <&sci0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
uart0: uart { | ||
current-speed = <115200>; | ||
status = "okay"; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
identifier: ek_ra2a1 | ||
name: Renesas EK-RA2A1 | ||
type: mcu | ||
arch: arm | ||
ram: 32 | ||
flash: 256 | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
supported: | ||
- gpio | ||
- uart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (c) 2024 TOKITA Hiroshi | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000 | ||
|
||
# Enable GPIO | ||
CONFIG_GPIO=y | ||
CONFIG_PINCTRL=y | ||
|
||
# Enable Console | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=y | ||
CONFIG_CONSOLE=y | ||
|
||
CONFIG_BUILD_OUTPUT_HEX=y | ||
CONFIG_BUILD_NO_GAP_FILL=y |