Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/renesas/fpb_rx140/Kconfig.fpb_rx140
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config BOARD_FPB_RX140
select SOC_R5F51406
9 changes: 9 additions & 0 deletions boards/renesas/fpb_rx140/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

# options after "--tool-opt=" are directly passed to the tool. So instead of "--iface=JTAG" you could also write "--tool-opt=-if JTAG"
board_runner_args(jlink "--device=R5F51406" "--iface=FINE" "--speed=1000" "--tool-opt=-jtagconf -1,-1 -autoconnect 1")
board_runner_args(rfp "--device=RX100" "--tool=e2l" "--interface=fine" "--erase")

include(${ZEPHYR_BASE}/boards/common/rfp.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
6 changes: 6 additions & 0 deletions boards/renesas/fpb_rx140/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: fpb_rx140
full_name: Fast Prototyping Board for RX140
vendor: renesas
socs:
- name: r5f51406
Binary file added boards/renesas/fpb_rx140/doc/fpb_rx140.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
148 changes: 148 additions & 0 deletions boards/renesas/fpb_rx140/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
.. zephyr:board:: fpb_rx140

Overview
********

The Fast Prototyping Board for RX140 MCU Group comes equipped with an RX140 MCU
(R5F51406BGFN). The board is inexpensive for RX140 evaluation and prototype development of
various applications. It has an emulator circuit so you can write/debug programs just by
connecting it to a PC with a USB cable. In addition, it has high expandability with Arduino Uno
and two Pmod™ connectors as standard, and through-hole access to all pins of the
microcontroller.

**MCU Native Pin Access**

- R5F51406ADFN MCU

- Max 48MHz, 32-bit RXv2 core (RXv2)
- 256 KB Flash, 64 KB RAM
- 80-pin, LFQFP package

- Native pin access through 2 x 40-pin male headers (not fitted)
- RX MCU current measurement point for precision current consumption measurement
- RX MCU on-chip oscillators as main clock
- Providing 32.768 kHz crystal oscillator as sub clock

**System Control and Ecosystem Access**

- Two 5 V input sources

- USB
- External power supply (using 2-pin header [not fitted])

- On-board debugger / programmer (E2 emulator On Board (referred as E2OB, FINE Interface))

- User LEDs and switches

- Two User LEDs (green)
- Power LED (green) indicating availability of regulated power
- Debug LED (yellow) indicating the debug connection
- One User switch
- One Reset switch

- Two popular ecosystem expansions

- Two Digilent PmodTM
- Arduino® (Uno R3) connector

Hardware
********
Detailed hardware features can be found at:

- RX140 MCU: `RX140 Group User's Manual Hardware`_
- FPB-RX140: `FPB_RX140 - User's Manual`_

Supported Features
==================

.. zephyr:board-supported-hw::

Programming and Debugging
*************************

.. zephyr:board-supported-runners::

Applications for the ``fpb_rx140`` board can be built, flashed, and debugged using standard
Zephyr workflows. Refer to :ref:`build_an_application` and :ref:`application_run` for more details.

**Note:** Currently, the RX140 is built and programmed using the Renesas GCC RX toolchain.
Please follow the steps below to program it onto the board:

- Download and install GCC for RX toolchain:

https://llvm-gcc-renesas.com/rx-download-toolchains/

- Set env variable:

.. code-block:: console

export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE=<Path/to/your/toolchain>/bin/rx-elf-

- Build the Blinky Sample for FPB-RX140

.. code-block:: console

cd ~/zephyrproject/zephyr
west build -p always -b fpb_rx140 samples/basic/blinky

Flashing
========

The program can be flashed to RSK-RX140 using the **E2OB** by connecting the board to the host PC
and open Jumper J4.
Here’s an example for building and flashing the :zephyr:code-sample:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: rsk_rx140
:goals: build flash

Debugging
=========

You can use `Renesas Debug extension`_ on Visual Studio Code for a visual debug interface.
The configuration for launch.json is as below.

.. code-block:: json

{
"version": "0.2.0",
"configurations": [
{
"type": "renesas-hardware",
"request": "launch",
"name": "RX140 Renesas Debugging E2lite",
"target": {
"deviceFamily": "RX",
"device": "R5F51406",
"debuggerType": "E2LITE"
"serverParameters": [
"-uUseFine=", "1",
"-w=", "0",
],
}
}
]
}

References
**********

- `FPB_RX140 Website`_
- `RX140 MCU group Website`_

.. _FPB_RX140 Website:
https://www.renesas.com/en/design-resources/boards-kits/fpb-rx140

.. _RX140 MCU group Website:
https://www.renesas.com/en/products/rx140

.. _FPB_RX140 - User's Manual:
https://www.renesas.com/en/document/mat/fpb-rx140-v1-users-manual

.. _RX140 Group User's Manual Hardware:
https://www.renesas.com/en/document/mah/rx140-group-users-manual-hardware-rev120

.. _Renesas Debug extension:
https://marketplace.visualstudio.com/items?itemName=RenesasElectronicsCorporation.renesas-debug
14 changes: 14 additions & 0 deletions boards/renesas/fpb_rx140/fpb_rx140-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

&pinctrl {
sci5_default: sci5_default {
group1 {
psels = <RX_PSEL(RX_PSEL_SCI_5, 10, 4)>, /* TX */
<RX_PSEL(RX_PSEL_SCI_5, 10, 3)>; /* RX */
};
};
};
75 changes: 75 additions & 0 deletions boards/renesas/fpb_rx140/fpb_rx140.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <renesas/r5f51406.dtsi>
#include <dt-bindings/gpio/gpio.h>
#include "fpb_rx140-pinctrl.dtsi"

/ {
model = "Renesas FPB+RX140 KIT";
compatible = "renesas,fpb_rx140";

chosen {
zephyr,sram = &sram0;
zephyr,flash = &code_flash;
zephyr,flash-controller = &flash;
zephyr,console = &uart5;
zephyr,shell-uart = &uart5;
};

leds {
compatible = "gpio-leds";

led1: led1 {
gpios = <&ioport2 0 GPIO_ACTIVE_LOW>;
label = "LED1";
};

led2: led2 {
gpios = <&ioport3 2 GPIO_ACTIVE_LOW>;
label = "LED2";
};
};

aliases {
led0 = &led1;
led1 = &led2;
};
};

&subclk {
status = "okay";
};

&pclkblock {
clocks = <&hoco>;
};

&cmt {
clock-frequency = <3000000>;
status = "okay";
};

&ioport2 {
status = "okay";
};

&ioport3 {
status = "okay";
};

&sci5 {
pinctrl-0 = <&sci5_default>;
pinctrl-names = "default";
status = "okay";

uart5: uart {
current-speed = <115200>;
status = "okay";
};
};
15 changes: 15 additions & 0 deletions boards/renesas/fpb_rx140/fpb_rx140.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

identifier: fpb_rx140
name: Fast Prototyping Board for RX140
type: mcu
arch: rx
toolchain:
- cross-compile
supported:
- gpio
- serial
- timer
ram: 64
flash: 256
13 changes: 13 additions & 0 deletions boards/renesas/fpb_rx140/fpb_rx140_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

# Enable GPIO
CONFIG_GPIO=y

# Enable UART driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
5 changes: 5 additions & 0 deletions boards/renesas/rsk_rx140/Kconfig.rsk_rx140
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config BOARD_RSK_RX140
select SOC_R5F51406
9 changes: 9 additions & 0 deletions boards/renesas/rsk_rx140/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

# options after "--tool-opt=" are directly passed to the tool. So instead of "--iface=JTAG" you could also write "--tool-opt=-if JTAG"
board_runner_args(jlink "--device=R5F51406" "--iface=FINE" "--speed=1000" "--tool-opt=-jtagconf -1,-1 -autoconnect 1")
board_runner_args(rfp "--device=RX100" "--tool=e2l" "--interface=fine" "--erase")

include(${ZEPHYR_BASE}/boards/common/rfp.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
6 changes: 6 additions & 0 deletions boards/renesas/rsk_rx140/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: rsk_rx140
full_name: Renesas Starter Kit for RX140
vendor: renesas
socs:
- name: r5f51406
Loading
Loading