boards: mikroe: add initial support for Mikroe RA4M1 Clicker
The RA4M1 Clicker is a basic development board for the Renesas RA4M1 Microcontroller. The board contains J-Link on board, two LEDs and push buttons and several headers for interfacing with external devices. Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
This commit is contained in:
parent
a1ac84ca38
commit
04e60be9bf
8 changed files with 237 additions and 0 deletions
5
boards/mikroe/clicker_ra4m1/Kconfig.mikroe_clicker_ra4m1
Normal file
5
boards/mikroe/clicker_ra4m1/Kconfig.mikroe_clicker_ra4m1
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2024 Ian Morris
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_MIKROE_CLICKER_RA4M1
|
||||
select SOC_R7FA4M1AB3CFM
|
6
boards/mikroe/clicker_ra4m1/board.cmake
Normal file
6
boards/mikroe/clicker_ra4m1/board.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2024 Ian Morris
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(pyocd "--target=r7fa4m1ab")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
8
boards/mikroe/clicker_ra4m1/board.yml
Normal file
8
boards/mikroe/clicker_ra4m1/board.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2024 Ian Morris
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board:
|
||||
name: mikroe_clicker_ra4m1
|
||||
vendor: mikroe
|
||||
socs:
|
||||
- name: r7fa4m1ab3cfm
|
BIN
boards/mikroe/clicker_ra4m1/doc/img/mikroe_clicker_ra4m1.jpg
Normal file
BIN
boards/mikroe/clicker_ra4m1/doc/img/mikroe_clicker_ra4m1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
87
boards/mikroe/clicker_ra4m1/doc/index.rst
Normal file
87
boards/mikroe/clicker_ra4m1/doc/index.rst
Normal file
|
@ -0,0 +1,87 @@
|
|||
.. _mikroe_clicker_ra4m1:
|
||||
|
||||
Mikroe Clicker RA4M1
|
||||
####################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The Mikroe Clicker RA4M1 development board contains a Renesas Cortex-M4 based
|
||||
R7FA4M1AB3CFM Microcontroller operating at up to 48 MHz with 256 KB of Flash
|
||||
memory and 32 KB of SRAM.
|
||||
|
||||
.. figure:: img/mikroe_clicker_ra4m1.jpg
|
||||
:align: center
|
||||
:alt: Clicker RA4M1
|
||||
|
||||
Clicker RA4M1 (Credit: MikroElektronika d.o.o.)
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
The Clicker RA4M1 board contains a USB Type-C connector, two LEDs, two push
|
||||
buttons, and a reset button. It has J-Link onboard and mikroBUS socket for
|
||||
interfacing with external electronics. For more information about the
|
||||
development board see the `Clicker RA4M1 website`_.
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The Zephyr Mikroe Clicker RA4M1 configuration supports the following hardware
|
||||
features:
|
||||
|
||||
+-----------+------------+-------------------------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+=====================================+
|
||||
| NVIC | on-chip | nested vector interrupt controller |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| UART | on-chip | serial port-polling |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| PINMUX | on-chip | pinmux |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| GPIO | on-chip | GPIO output |
|
||||
| | | GPIO input |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Other hardware features have not been enabled yet for this board.
|
||||
|
||||
The default configuration can be found in the defconfig file:
|
||||
:zephyr_file:`boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1_defconfig`.
|
||||
|
||||
Programming and debugging
|
||||
*************************
|
||||
|
||||
Building & Flashing
|
||||
===================
|
||||
|
||||
You can build and flash an application in the usual way (See
|
||||
: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: mikroe_clicker_ra4m1
|
||||
:goals: build flash
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
Debugging also can be done in the usual way.
|
||||
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: mikroe_clicker_ra4m1
|
||||
:maybe-skip-config:
|
||||
:goals: debug
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _Clicker RA4M1 website:
|
||||
https://www.mikroe.com/ra4m1-clicker
|
95
boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.dts
Normal file
95
boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.dts
Normal file
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Ian Morris
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <renesas/ra/r7fa4m1ab3cfm.dtsi>
|
||||
#include <zephyr/dt-bindings/pinctrl/renesas/pinctrl-r7fa4m1xxxxxx.h>
|
||||
#include <zephyr/dt-bindings/gpio/gpio.h>
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
model = "Mikroe Clicker RA4M1";
|
||||
compatible = "renesas,r7fa4m1ab3cfm";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
ld1: led_1 {
|
||||
gpios = <&ioport4 9 GPIO_ACTIVE_HIGH>;
|
||||
label = "User LED 1";
|
||||
};
|
||||
ld2: led_2 {
|
||||
gpios = <&ioport4 8 GPIO_ACTIVE_HIGH>;
|
||||
label = "User LED 2";
|
||||
};
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
btn1: button_1 {
|
||||
gpios = <&ioport3 4 GPIO_ACTIVE_LOW>;
|
||||
label = "User Button 1";
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &ld1;
|
||||
led1 = &ld2;
|
||||
sw0 = &btn1;
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
sci0_default: sci0_default {
|
||||
group1 {
|
||||
pinmux = <P410_RXD0>, <P411_TXD0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sci0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&sci0_default>;
|
||||
pinctrl-names = "default";
|
||||
uart0: uart {
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&ioport3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ioport4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&fcu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mosc {
|
||||
status = "okay";
|
||||
clock-frequency = <12000000>;
|
||||
};
|
||||
|
||||
&cgc {
|
||||
clock-source = <&mosc>;
|
||||
iclk-div = <1>;
|
||||
pclka-div = <1>;
|
||||
pclkb-div = <2>;
|
||||
pclkc-div = <1>;
|
||||
pclkd-div = <1>;
|
||||
fclk-div = <2>;
|
||||
};
|
14
boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.yaml
Normal file
14
boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
identifier: mikroe_clicker_ra4m1
|
||||
name: Mikroe Clicker RA4M1
|
||||
vendor: mikroe
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
ram: 32
|
||||
flash: 256
|
||||
supported:
|
||||
- gpio
|
||||
- uart
|
22
boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1_defconfig
Normal file
22
boards/mikroe/clicker_ra4m1/mikroe_clicker_ra4m1_defconfig
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2024 Ian Morris
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12000000
|
||||
|
||||
CONFIG_BUILD_OUTPUT_HEX=y
|
||||
|
||||
# enable uart driver
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
# enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# enable pin controller
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable Clocks
|
||||
CONFIG_CLOCK_CONTROL=y
|
Loading…
Add table
Add a link
Reference in a new issue