Unlike most other edge AI boards which rely solely on the CPU to perform model inferencing tasks, the RASynBoard from Avnet makes use of Syntiant's NDP120 Neural Decision Processor to accelerate ML/DSP workloads while minimizing power consumption. Connected to this processor is a Renesas RA6M4 microcontroller with an Arm Cortex-M33 CPU @ 200MHz, 1MB of flash memory, and 256KB of SRAM, as well as a native USB 2.0 interface. A Renesas DA16600 WiFi/Bluetooth module provides robust connectivity options while TDK InvenSense's built-in 6-axis IMU (ICM42670-P) and built-in PDM microphone (MMICT5838) allow for easy data collection right on the board.
Accompanying the core RASynBoard is an IO expansion board that contains a small Renesas RX231 MCU that is factory-programmed to implement an E2OB debugger that facilitates application development, flash programming, and SWD debug of the RA6M4 host MCU. There is also a plethora of other connectors for attaching various modules as well as various expansion connectors: Pmod, Click shuttle, two external microphone headers, plus a 14-pin GPIO header. A microSD card can be inserted to store collected sensor data from the IMU/microphone, load firmware files onto the NDP120, and facilitate the copying of NDP120 firmware files onto the SPI flash chip. Lastly, the IO Board has two buttons, one for the user and one to reset, and a user-controlled RGB LED.
All of the files used in this project can be found in this table on GitHub. You will need to clone the rasynboard_ew_demo files to a local folder.
Required softwareIn order to flash a pre-built binary.srec file to the RA6M4 MCU, you'll first need to download and install the Renesas Flash Programmer utility from the Downloads section under the tool's page. Optionally, Renesas's e2Studio application, based on the popular Eclipse IDE, can be downloaded to make changes to the FreeRTOS-based demo or create your own applications. Finally, you'll need a serial terminal application such as Tera Term, Putty, or screen (if using Linux/MacOS) to view data coming from the RA6M4's UART pins via USB-to-TTL serial converter.
The primary purpose of the micro SD card is for loading firmware onto the NDP120 AI accelerator chip. Under the ndp120
folder in all Rasynboard MCU projects, there is a folder called synpkg_files
which contains various pre-built NDP120 firmware binaries that can be loaded into the NDP120 and exercised from the MCU application. Before running a new MCU application on the RASynBoard, these files need to be copied onto a micro SD card When the RA6M4 boots, the MCU application will load a subset of these firmware files (as defined by a config.ini file) into the NDP120's RAM. In addition, the SD card also provides a way to transfer these NDP120 files into SPI flash (on the core board) which allows the tiny core board to be used standalone by allowing the NDP120 to boot from flash.
The User button on the IO Board has two functions: a long press (3 seconds) will copy the firmware files from the SD card to the SPI flash chip. Meanwhile, a short press (0.4 seconds) will capture 30 seconds of microphone audio or 30 seconds of IMU sensor data and store it on the SD card.
RA6M4 modesOn top of the core RASynBoard is the small 2-pin J5 jumper located between the the WiFi/Bluetooth module and the USB-C connector, and its role is to dictate whether to boot into Self-boot/Run mode when removed, wherein the board operates as normal and can be used with the IO Board, or SCI boot mode when bridged. This second mode allows the RASynBoard Core Board to operate in a standalone mode, albeit with the following restrictions:
- NDP120 firmware must load from the SPI flash chip
- Programming is only possible via the Renesas Flash Programmer (RFP) application
- No SWD debugging support
- No RGB LED, buttons, microSD card, or other interfaces found on the IO Board are available
This means, typically, that the J5 jumper will be left open.
There is another jumper denoted as J3 which is located on the innermost two pins on IO Board and is factory-fitted. It is responsible for the mode of the E2OB debugger MCU. When bridging pins 1 and 2 on the header, the E2OB is placed into reset mode, thus letting the RA6M4 go into Self-boot/Run mode and run normally But when removed during either development with e2Studio or when reflashing via the Renesas Flash Programmer, SWD debugging and/or reprogramming becomes available.
Before plugging anything into the board, drag the four files listed under the sdcard folder to a microSD card. There should be config.ini and three .synpkg files containing firmware for the DSP, MCU, and Neural Network Processor. Insert the microSD card into the IO Board.
After ensuring the jumper is removed from both J3 and J5, connect the USB-to-serial converter as shown in the diagram below to the RASynBoard assembly:
An external power connection is not needed since the USB A to USB C cable should be plugged into the IO Board's USB C port, although power can be provided by one of these three sources:
- The USB C connector on the IO Board (recommended during development)
- The USB C connector on the Core board (for reflashing the standalone board)
- The JST battery connector (when deployed as a battery-operated RASynBoard)
Next, open the Renesas Flash Programmer utility, click File > New Project, then use the configuration as shown below after setting the Project Folder to the folder cloned from GitHub:
The main window should now show the board as connected. Next, head to the Operation tab, select the compiled .srec file, and click the Start button to begin flashing the new firmware.
Now unplug the RASynBoard, bridge jumper J3 (the one on the IO Board), and open a serial monitor with these settings:
Once the board has been powered on, you should see it running in the monitor:
The board's RGB LED should illuminate in the following colors depending on which word has been said if the Mode
under [NDP Firmware]
has been set to either 1
or 2
:
If set to 3
, placing the board flat on a table and moving it in a circle will cause the LED to turn green, as well as print the class index of 0
in the serial terminal.
The config.ini file on the micro SD card has multiple parameters that can be adjusted to enable software changes without needing to rebuild/reflash the firmware. These options include:
[NDP Firmware]
- Use either the single microphone, dual-microphones in conjunction with an external one, or IMU motion sensing[Dual Mic]
,[Single Mic]
,[Circle Motion]
- Identifies the NDP120 firmware files to load for each application mode[Led]
- Defines which colors to use for each inference result[Debug Print]
- Identifies to which portprintf
output will be sent.1
for USB-to-serial via the Pmod connector or2
for USB C output on the Core board, albeit with some startup messages missing while the port is enumerated.
Feel free to explore Avnet's RASynBoard_Projects repository for more demos that can be loaded onto the board. The repository is at an early stage currently, but there are plans to add more use-case examples in the upcoming weeks. Each demo has the source code listed for further experimentation with regards to the types of hardware connected, what kinds of processing happen, and external connectivity via the DA16600 WiFi/Bluetooth chipset.
Also revisit Hackster.io in future weeks for more blogs like this one about Keyword detection using Edge Impulse on RASynBoard by Monica Houston that will provide more detail on the use of 3rd party tools for creating and deploying your own models as .synpkg
files to the NDP120.
Comments
Please log in or sign up to comment.