1.. _ek_ra6m4:
2
3RA6M4 Evaluation Kit
4####################
5
6Overview
7********
8
9The Renesas RA6M4 group uses the high-performance Arm® Cortex®-M33
10core with TrustZone®. Secure element functionality providing better
11performance, unlimited secure key storage, key management, and lower
12BOM cost, as well as the integrated Ethernet MAC with individual DMA
13ensures high data throughput. The RA6M4 is suitable for IoT applications
14requiring Ethernet, future proof security, large embedded RAM, and low
15active power consumption down to 99uA/MHz running the CoreMark®
16algorithm from Flash.
17
18The key features of the EK-RA6M4 board are categorized in three groups as follow:
19
20**MCU Native Pin Access**
21
22- 200MHz Arm Cortex-M33 based RA6M4 MCU in 144 pins, LQFP package
23- Native pin access through 4 x 40-pin male headers
24- MCU current measurement points for precision current consumption measurement
25- Multiple clock sources - RA6M4 MCU oscillator and sub-clock oscillator crystals,
26  providing precision 24.000 MHz and 32,768 Hz reference clock.
27  Additional low precision clocks are avaialbe internal to the RA6M4 MCU
28
29**System Control and Ecosystem Access**
30
31- USB Full Speed Host and Device (micro-AB connector)
32- Three 5 V input sources
33
34  - USB (Debug, Full Speed)
35  - External power supply (using surface mount clamp test points and power input vias)
36
37- Three Debug modes
38
39  - Debug on-board (SWD)
40  - Debug in (ETM, SWD and JTAG)
41  - Debug out (SWD)
42
43- User LEDs and buttons
44
45  - Three User LEDs (red, blue, green)
46  - Power LED (white) indicating availability of regulated power
47  - Debug LED (yellow) indicating the debug connection
48  - Two User buttons
49  - One Reset button
50
51- Five most popular ecosystems expansions
52
53  - Two Seeed Grove system (I2C/Analog) connectors
54  - One SparkFun Qwiic connector
55  - Two Digilent Pmod (SPI and UART) connectors
56  - Arduino (Uno R3) connector
57  - MikroElektronika mikroBUS connector
58
59- MCU boot configuration jumper
60
61**Special Feature Access**
62
63- Ethernet (RJ45 RMII interface)
64- 32 Mb (256 Mb) External Quad-SPI Flash
65- 64 Mb (512 Mb) External Octo-SPI Flash
66
67.. figure:: ek_ra6m4.webp
68	:align: center
69	:alt: RA6M4 Evaluation Kit
70
71	EK-RA6M4 Board Functional Area Definitions (Credit: Renesas Electronics Corporation)
72
73Hardware
74********
75Detailed hardware feature for the RA6M4 MCU group can be found at `RA6M4 Group User's Manual Hardware`_
76
77.. figure:: ra6m4_block_diagram.webp
78	:width: 442px
79	:align: center
80	:alt: RA6M4 MCU group feature
81
82	RA6M4 Block diagram (Credit: Renesas Electronics Corporation)
83
84Detailed hardware feature for the EK-RA6M4 MCU can be found at `EK-RA6M4 - User's Manual`_
85
86Supported Features
87==================
88
89The below features are currently supported on Zephyr OS for EK-RA6M4 board:
90
91+-----------+------------+----------------------+
92| Interface | Controller | Driver/Component     |
93+===========+============+======================+
94| GPIO      | on-chip    | gpio                 |
95+-----------+------------+----------------------+
96| MPU       | on-chip    | arch/arm             |
97+-----------+------------+----------------------+
98| NVIC      | on-chip    | arch/arm             |
99+-----------+------------+----------------------+
100| UART      | on-chip    | serial               |
101+-----------+------------+----------------------+
102| CLOCK     | on-chip    | clock control        |
103+-----------+------------+----------------------+
104| I2C       | on-chip    | i2c                  |
105+-----------+------------+----------------------+
106| SPI       | on-chip    | spi                  |
107+-----------+------------+----------------------+
108| COUNTER   | on-chip    | counter              |
109+-----------+------------+----------------------+
110| ADC       | on-chip    | adc                  |
111+-----------+------------+----------------------+
112| PWM       | on-chip    | pwm                  |
113+-----------+------------+----------------------+
114
115Other hardware features are currently not supported by the port.
116
117Programming and Debugging
118*************************
119
120Applications for the ``ek_ra6m4`` board target configuration can be
121built, flashed, and debugged in the usual way. See
122:ref:`build_an_application` and :ref:`application_run` for more details on
123building and running.
124
125Flashing
126========
127
128Program can be flashed to EK-RA6M4 via the on-board SEGGER J-Link debugger.
129SEGGER J-link's drivers are avaialbe at https://www.segger.com/downloads/jlink/
130
131To flash the program to board
132
133  1. Connect to J-Link OB via USB port to host PC
134
135  2. Make sure J-Link OB jumper is in default configuration as describe in `EK-RA6M4 - User's Manual`_
136
137  3. Execute west command
138
139	.. code-block:: console
140
141		west flash -r jlink
142
143Debugging
144=========
145
146You can use Segger Ozone (`Segger Ozone Download`_) for a visual debug interface
147
148Once downloaded and installed, open Segger Ozone and configure the debug project
149like so:
150
151* Target Device: R7FA6M4AF
152* Target Interface: SWD
153* Target Interface Speed: 4 MHz
154* Host Interface: USB
155* Program File: <path/to/your/build/zephyr.elf>
156
157**Note:** It's verified that we can debug OK on Segger Ozone v3.30d so please use this or later
158version of Segger Ozone
159
160References
161**********
162- `EK-RA6M4 Website`_
163- `RA6M4 MCU group Website`_
164
165.. _EK-RA6M4 Website:
166   https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ek-ra6m4-evaluation-kit-ra6m4-mcu-group
167
168.. _RA6M4 MCU group Website:
169   https://www.renesas.com/us/en/products/microcontrollers-microprocessors/ra-cortex-m-mcus/ra6m4-200mhz-arm-cortex-m33-trustzone-high-integration-ethernet-and-octaspi
170
171.. _EK-RA6M4 - User's Manual:
172   https://www.renesas.com/us/en/document/man/ek-ra6m4-v1-users-manual
173
174.. _RA6M4 Group User's Manual Hardware:
175   https://www.renesas.com/us/en/document/man/ra6m4-group-user-s-manual-hardware?r=1333976
176
177.. _Segger Ozone Download:
178   https://www.segger.com/downloads/jlink#Ozone
179