Skip to content

Latest commit

 

History

History
191 lines (146 loc) · 10.9 KB

RASynPuckDemo.md

File metadata and controls

191 lines (146 loc) · 10.9 KB

Avnet RASynBoard RASynPuck Demo

This page contains details for creating a copy of the RASynPuck demo. Please see the RASynPuckDemo branch readme.md file for details on changes to the Avnet Out of Box application to support the RASynBoard demo.





Demo Overview

Note: These instructions detail how to load the RASynPuck image

The RASynPuck demo is a pocket friendly, wireless, battery operated demo fixture with a supporting cloud dashboard hosted on Avnet's IoTConnect Cloud Platform. The demo can be used to demonstrate ML models running on the Syntiant NDP120 Neural Decision Processor. Additionally all ML model data and ML inference events can be viewed in a cloud hosted dashboard. The IoTConnect instructions include details to stand up the RASynBoard dashboard.

Note: If you don't care to run the demo on just the core board, you can work through the IoTConnect instructions and end up with the same demo using the RASynBoard EVK (core board + I/O board).

The demo uses the core board only and requires managing the following items without the microSD card. The Out-of-Box application implementation includes ways to manage these items without the microSD card.

  • Cloud X.509 certificates
  • ML model
  • Cloud configuration items from the config.ini file

Table of Contents

  1. Overview
  2. Required Hardware
  3. Required Software
  4. Setup the Demo System
    1. Flash the latest RASynPuck image release to the RASynBoard
    2. Copy the release microSD Card files to the microSD card
    3. Select the RASynPuck ML model to run
    4. Connect the RASynbBoard to IoTConnect
    5. Import the RASynPuck Dashboard into your IoTConnect account
    6. Update the WiFi configuration
    7. Update the X.509 certificate location
    8. Flash the ML model and configuration to SPI Flash
    9. Separate the boards and test
  5. Conclusion

Required Hardware

  • 1 RASynBoard EVK
  • 1 microSD card
  • 1 RASynPuck Enclosure
    • Optional, this demo can be run without the RASynPuck fixture if desired
    • For best results print the RASynPuck with a resin 3D printer
  • 1 500mAH battery
    • Optional, this demo can be powered by the USB-C connector if desired

Required Software

  • Renesas Flash Programmer (to flash the image to the RA6M4)
  • Renesas WiFi Provisioning app (optional but desirable to change/manage the wifi network when just running the core board alone)

Setup the Demo System

Follow the steps here to get your RASynBoard demo up and running. The tasks we need to complete are . . .

  1. Flash the Avnet RASynBoard RASynPuckDemo-v1.6.2.RASynPuck_build.srec or greater image onto the RASynBoard's Renesas RA6M4 MCU
    1. Flash the image
    2. Update the microSD card with the release microSD card files
  2. Select the RASynPuck demo ML model
  3. Connect the board to IoTConnect and create the dashboard from a template
  4. Update the WiFi configuration
  5. Change the certificates configuration to Don't load any certificates, the certificates are already loaded onto the DA16600
  6. Flash the ML models and configuration to SPI Flash memory on the Core board
  7. Separate the core board from the I/O board and test

Flash the OOB V1.6.2_RASynPuck+ image to the Renesas RA6M4 MCU

  1. Follow the How to use RASynBoard Releases instructions to load the latest RASynPuck image
    1. Be sure to use the latest release >= 1.6.2
      • Look for the AVT-RASynPuckDemo-v.RASynPuck_Build.srec image
    2. A video walkthrough of the process is available here

Copy the release microSD card file to the microSD card

Each release contains a zip file microSD-Files-<version string>.zip that contains all the files that should be loaded onto the microSD card.

  1. Copy the files from the release microSD-Files-<version string>.zip file into the root directory of your microSD card

Select the ML model to run

We want to run the RASynPuck ML model. In releases after 1.6.2, this is Mode=10

  1. Use the instructions here to change the model running on the board.
  2. A video walkthrough of the process is available here



Note: If you're not loading the RASynPuck demo, feel free to select the model you want to run. When we create the dashboard I'll provide instructions for loading the generic dashboard that will work with any model

Connect the RASynBoard to IoTConnect

In order to use the IoTconnect dashboard, you must first setup the IoTConnect account/device/dashboard. All the details to accomplish these tasks is documented in the IoTConnect Documentation.

Note: Before moving on, you must have your device connected to IoTConnect

  1. A video walkthrough of the process is available here

Update the WiFi configuration

There are two ways to configure the WiFi network, both are documented here. Which configuration you use depends on the WiFi network where you plan to show the demo.

  • If you have a WiFi Hotspot or dedicated Access Point then it’s recommended to use the static configuration where you add the SSID and Password to the config.ini file

  • If you must use the WiFi at the location, you can use the Renesas WiFi Configuration mobile application to change the WiFi network over BLE. Use caution here as some public WiFi networks require the user acknowledge an agreement and since the RASynBoard is headless, there will be no way to complete the WiFi registration.

    • Don't forget to enable BLE in the config.ini file
  • Video Link (9 minutes)

Change the certificates configuration to "Don't load any certificates, the certificates are already loaded onto the DA16600"

When you setup the device to connect to IoTConnect, you copied the X.509 certificates to the microSD card. Since we'll be separating the core board from the I/O board, we need to reconfigure the application and tell it how to find the X.509 certificates.

  1. Verify that the current configuration connects to IoTConnect
    • If you completed the IoTConnect configuration this should be true
    • This step verifies that the certificates are correctly loaded into the DA16600 non-volatile memory
  2. Edit the config.ini file on the micro SD card
    • Change Cert_Location to 2
    • This tells the application not to delete the certificates loaded on the DA16600 and to assume that they are there and good to go.
  3. Power cycle the board to read the new configuration
  4. Again verify that the application connects to IoTConnect
  5. Proceed to the next step



Flash the ML models and configuration to SPI Flash memory on the Core board

We're just about finished. At this point we have . . .

  1. Flashed the latest RASynPuck release onto the RASynBoard EVK
  2. Updated the microSD card with the files matching the release
  3. Selected the ML model we want to demo
  4. Connected the board to IoTConnect and created the dashboard from a template
  5. Configured the WiFi for our target demo location(s)
  6. Verified that the X.509 certificates are loaded in the DA16600 non-volatile memory
  7. Configured the application to use the certificates loaded on the DA16600
  8. Power cycled the device so that all the configuration changes are loaded

Next we need to flash the ML model files and the current configuration to the SPI memory on the core board

  1. With the application still running, press the user button (button closest to the corner) for 3+ seconds
    • The RGB Led will light Red once the long button press was detected
    • The application flashes all the NDP120 model files to SPI flash
    • The application writes the current configuration to SPI flash



Separate the core board from the I/O board and test

Now we can separate the boards!

  1. Power down the device
  2. Carefully remove the core board from the I/O board
  3. Power the core board using a USB-C cable to your development PC
  4. Note that a new COM port will enumerate on your PC that can be used to see debug from your core board
    1. COM settings are 115200, 8, N, 1
  5. Exercise your ML model, you should see debug

Note: early debug is not displayed since the application must bring up the Virtual COM port

  1. To see early debug type "log" in your terminal



Mount the RASynBoard core board into the RASynPuck fixture

  1. Mount the core board onto the board mount piece
    • The design requires a M4 screw and nut to hold the core board to the demo fixture
  2. Place the battery in the bottom void
  3. Pass the power connector up through the hole in the board mount piece
  4. Screw the bottom onto the board mount capturing the battery
  5. Connect the battery connector to the RASynBoard
  6. Screw the top onto the fixture

Note: The core board contains a charging circuit. Simply connect the battery to the core board and connect a USB-C cable between a USB-A port and the core board. A small LED will light RED while charging.

Conclusion

I hope you were successful in setting up your demo. If you run into any issues or have suggestion on how to improve the OOB application, please open a new issue in the GitHub repo.