Core2 for AWS IoT EduKit BSP 1.5.1

Core2 for AWS IoT EduKit API Reference

This Core2 for AWS IoT EduKit API Reference provides a set of definitions for the various drivers that are included as part of the M5Stack Core2 for AWS IoT EduKit board support package (BSP). A board support package is the software layer that contains hardware drivers and other routines you can use when writing your applications to access the on-board hardware features. The BSP relies on and sits on top of Espressif's IoT Developer Framework (ESP-IDF) version 4.2, and executes from the ESP32-D0WD micro-controller unit (MCU) to all attached peripherals. The ESP-IDF v4.2 uses a customized version of FreeRTOS and usage of the BSP requires knowledge of C programming and real-time operating systems.

The BSP is located in each of the AWS IoT EduKit program's provided project's components/core2forAWS directory. Do the following steps to create an empty project:

  1. Copy the Core2 for AWS IoT EduKit BSP into your project's components directory.
  2. Copy the Core2 for AWS port of the esp-cryptoauthlib into your project's components directory.
  3. Copy sdkconfig.defaults, partitions_16MB.csv, CMakeLists.txt, and platformio.ini files to the root of your project. You can customize the platformio.ini file and CMakeLists.txt to suite your needs.
  4. Create a main.c file in a new main folder that at the has the following code:
    #include "core2forAWS.h"
    void app_main(void){
    Functions to initialize and access Core2 for AWS IoT EduKit hardware features.

For more information on setting up your PlatformIO configuration file and additonal configuration options, view their official docs. For information on the ESP-IDF v4.2 and APIs available, see Espressif's official documentation.

Driver APIs

Library Feature Description
Core2forAWS Microcontroller Main ESP32-D0WD MCU hardware helper APIs.
ATECC608 Secure Element ATECC608 Trust&GO secure element, which provides a hardware root of trust.
AXP192 Power Management Unit (PMU) Controls the input power, peripheral power, and battery charging circuit.
BM8563 Real-Time Clock (RTC) Date time RTC with alarm and timer.
Button Virtual Buttons Virtual touch buttons. Uses the FT6336U with mapped locations for button presses/holds/releases.
FT6336U Touch Capacitive touch controller providing X & Y coordinate screen touches.
ILI9342C Display Controller Provides functions to directly operate the display controller. To draw to the screen, use LVGL APIs.
MPU6886 Accelerometer/gyroscope Inertial Measurement Unit (IMU) with built-in temperature sensor.
NS4168 Speaker Speaker helper library.
SK6812 Side LEDs Side LED bar helper libraries which uses the Adafruit NEOPIXEL library.
SPM1423 Microphone Microphone helper library. Use ESP-IDF's I2S library to read from mic.
SD Card SD Card SD Card helper library.
Expansion Ports Ports A, B, C The peripheral (DAC, ADC, UART, and GPIO) helper library for expansion ports A, B, C.

3rd Party Libraries Used

Library Description
Light and Versitile Graphics Library (LVGL) Graphics library that has been ported for the Core2 for AWS.
ESP-AWS-IoT AWS IoT Device SDK for Embedded C ported for ESP32. Provides client connectivity and AWS IoT Device Shadow service capability.
ESP-CRYPTOAUTHLIB ATECC608 HAL ported for ESP32. Provides libraries to interface with the secure element.
ESP RainMaker An end-to-end connected home solution by Espressif to enable remote control and monitoring without any configuration required.
ESP-VA-SDK ESP-Voice-Assistance SDK for Alexa Voice Service capabilities on the ESP32.

Hardware Schematics

Hardware Section Parts Contained
Top (Amazon Orange) ESP32-D0WD, AXP192, BM8563, ILI9342C, FT6336U, NS4168
Bottom (Squid Ink grey) 10x SK6812, SPM1423, ATECC608