Getting Started with the Renesas EK-RA6M4 Microcontroller Dev KitFollow article
RA6M4 MCU evaluation kit provides no shortage of handy features to expedite development.
The Renesas RA6M4 family of microcontrollers are based on a high-performance 200MHz Arm Cortex-M33 processor core, with support for USB, Ethernet, CAN, TrustZone and plenty of other features. In this post we take a look at the EK-RA6M4 kit for evaluating the microcontroller, which adds a wealth of expansion options and comes with comprehensive software support.
A block diagram of the RA6M4 MCU can be seen above and the key features include:
- 200MHz Arm Cortex-M33 with TrustZone
- 256KB RAM, 8KB DataFlash (can be used like EEPROM), and 512KB-1MB Flash
- Secure element functionality
- Ethernet controller with DMA
- 2x 12-bit ADC and 2x 12-bit DAC
- Capacitive touch sensing
- USB 2.0 Full Speed
- CAN 2.0B
- QuadSPI and OctaSPI
- UART, SPI and I2C
- SDHI and MMC
A particularly notable feature is Arm TrustZone, which provides a trusted execution environment (TEE) that enables the isolation of data, services and specific areas of memory, between secure and non-secure environments. For example, the secure area may hold private keys and security routines, or perhaps a commercially sensitive algorithm. The RA6M4 implementation then prevents non-secure code from extracting secure code and data using DMA and DTC etc.
The EK-RA6M evaluation kitpackages the board together with Ethernet and USB cables, plus a card with quick start details.
The board is of a reasonable size, with plenty of I/O and divided into clearly labelled sections.
On the left we can see the MCU and four 0.1” headers that provide native pin access, along with measurement points for MCU current and USB current.
At the centre of the board we have both QSPI and OCTASPI flash devices, plus Ethernet.
On the right-hand side there are the following expansion headers:
Enabling rapid evaluation and prototyping via the use of a vast array of third party modules.
In the evaluation kit block diagram above we can see the various hardware features, which also include a J-Link OB, on-board debug probe.
If we start by cabling Micro USB port J11 on the board, to a USB port on our computer. If running Windows at this point a generic USB serial driver will need to be installed, whereas on Linux support should be built into the kernel.
Next we need to use a terminal emulator or perhaps on Linux something such as screen, to connect to the serial port. The port configuration is as follows:
- 115,200 bps
- 8 data bits
- no parity
- 1 stop bit
- no flow control
Upon connecting we are then greeted by a simple menu system.
Selecting option 1 results in kit information being printed out (MCU unique ID obscured).
If we select option 2 a web server is started up.
Connecting to the board over the network we are presented with a simple web page and similar kit information.
Next let’s take a look at how we would modify this example, to perhaps use as a starting point for one of our own projects. First, we’ll need to set up our development environment.
Support for the Renesas RA family is provided courtesy of the Renesas Flexible Support Package (FSP), which includes HAL drivers, middleware stacks and an RTOS, amongst other features. It also includes the e2 studio IDE, which is based on Eclipse. The default toolchain is GCC Arm Embedded, although IAR Embedded Workbench and Arm Keil MDK are also supported.
FSP also includes Arm TrustZone support and is undergoing PSA Level 2 certification, which involves vulnerability analysis and penetration testing for the root-of-trust.
Software setup instructions are hosted on GitHub, along with the complete FSP source code. Note that a computer running Windows is required for development.
We started by installing the v2.0.0 platform installer:
Install setup_fsp_v2.0.0_e2s_v2020.exe first
Following which we could then install the latest FSP package:
e2 studio was then launched.
Quick Start Example
The Quick Start example can be downloaded via the Renesas website. The ZIP file is extracted and following which we can select File → Import → General → Existing Projects in e2 studio.
Alternatively, we can get the Quick Start example, along with numerous other examples, via the ra-fsp-examples GitHub repository. We simply navigate to Releases, the appropriate release, and under this we can then find a ZIP with the projects for the RA6M4 kit, along with PDF documentation for this. Of course, we could also use a git client and instead clone the repository should we wish.
With the project loaded into the IDE we can then start to make changes. The Quick Start Guide shows how in just a few steps, we can modify the TCP/IP stack configuration. This is done by clicking on configuration.xml in the Project Explorer, which in turn launches the Configurator. Following which we select the Stacks tab in its Threads panel, where we will find Net Thread and under this, FreeRTOS + TCP.
In order to be able to configure stack properties, we need to switch to the FSP Configuration perspective, which can be achieved via Window → Perspective → Open Perspective → Other…
A Properties tab will now have appeared and if we select this we can make changes to the FreeRTOS stack configuration, before then going on to build our project. The Quick Start Guide shows how we can use this to disable DHCP and then edit the source to configure a static IP address instead.
Note how in the Stacks Configuration panel some of the modules to the right have an info circle icon, which if clicked loads up documentation. For example, the FreeRTOS+TCP module links off to documentation on the FreeRTOS website.
There are in excess of 40 examples provided by Renesas for the RA6M4 and these include:
- CAN bus (using external transceiver)
- FreeRTOS message queue and semaphore
- Low power module and power saving
- USB (HCDC, HHID, HMSC, PCDC, PHID and PMSC)
- Arm TrustZone
Documentation to support these, which covers the Renesas FSP architecture and API in some detail, can be found online.
The Renesas RA6M4 is well suited to applications which require some combination of a high performance MCU, plentiful I/O, Ethernet and enhanced security. Such as for example, fire detection, burglar alarm, metering, and control systems. EK-RA6M4 provides a convenient platform for both MCU evaluation and prototyping, with plenty of handy features plus comprehensive software support to get you up and running faster, courtesy of Renesas FSP.
For further details see:
- RA6M4 Product Page
- EK-RA6M4 Product Page
- EK-RA6M4 Quick Start Guide
- EK-RA6M4 User's Manual
- Flexible Software Package Product Page
- RS FSP Examples GitHub repository