Core2 for AWS IoT EduKit BSP 1.5.1
ATECC608

The ATECC608 library provides convenience functions to interact with the ATECC608 Trust&GO secure element. The initialization function configures the Espressif I2C driver and Microchip CryptoAuthLib driver for the secure element with preset parameters. The esp-cryptoauthlib is a port of Microchip CryptoAuthLib library and therefore, the application can use the CryptoAuthLib APIs documented here.

Circuit Block Diagram for the ATECC608 Secure Element

To enable this feature using KConfig, use the command pio run --environment core2foraws --target menuconfig from within the root of the project directory in your PlatformIO terminal window and go to the menu Component Config --> Core2 for AWS features to set the features you want to enable.

Example

The following example initializes the Core2 for AWS, which initializes the PMU for the battery and other enabled features — such as the ATECC608. It then prints the ATECC608 serial number using the ESP logger.

#include "esp_log.h"
#include "core2forAWS.h"
#include "atecc608.h"
static const char *TAG = "EXAMPLE";
void app_main(void){
char * serial_num = malloc(ATCA_SERIAL_NUM_SIZE * 2 + 1);
ATCA_STATUS ret = Atecc608_GetSerialString(serial_num);
if( ret != 0){
ESP_LOGE(TAG, "Error getting ATECC608 serial number: %d", ret);
abort();
}
ESP_LOGI(TAG, "Serial number: %s", serial_num);
}
ATCA_STATUS Atecc608_GetSerialString(char *sn)
Retrieves the unique serial number from the ATECC608.
Definition: atecc608.c:56
Functions for the ATECC608 Trust&GO secure element.
void Core2ForAWS_Init(void)
Initializes the power chip with default values, enables battery charging, and initializes all enabled...
Definition: core2forAWS.c:32
Functions to initialize and access Core2 for AWS IoT EduKit hardware features.
#define TAG
Definition: i2c_device.c:10

Preprocessor Macros

Functions