Any sample for ATECC608A?

I found GIGA R1 also come with ATECC608A-MAHDA-T from their spec.
But from document page, there's no any document tell about this secure element chip.

There is any sample specific for GIGA R1? or it compatible with any other ATECC608 library?

Interesting question that is hard to answer. Without knowing which unit you have. Here is the best answer I can giv: https://ww1.microchip.com/downloads/en/DeviceDoc/40001977A.pdf

There is an Arduino library for the ATECC508/ATECC608 chips but it has not been modified (as yet) to include the Giga board - ArduinoECCX08 - Arduino Reference

There is also a Sparkfun library available, which appears to work with some tweaks.

According to the board management file (pins_arduino.h) you can use the handy "CRYPTO_WIRE" definition to reference the correct I2C port.

Then in the Sparkfun examples swap wire.begin(); with CRYPTO_WIRE.begin(); and start the library using: if (atecc.begin(ATECC508A_ADDRESS_DEFAULT, CRYPTO_WIRE) == true)

2 Likes

Thank you, Seem ArduinoECCX08 can use on giga too.
at least, no compile error.

Yes, it is compatible, although I just found an anomaly.

The GitHub version of this library already includes the "mbed_giga" property in the library.properties file, but for some reason when you use the Arduino IDE library manager this update is not included.

Inside ECCX08.cpp it includes:

#ifdef CRYPTO_WIRE
ECCX08Class ECCX08(CRYPTO_WIRE, 0x60);
#else
ECCX08Class ECCX08(Wire, 0x60);
#endif

This allows the code to use the correct wire port.

I tested using the ECCX08 HMAC functionality example and it worked fine.

The reason is because a new release of the library has not been created since that change. For this reason, the mbed_giga architecture identifier is not included in the file in the release version of the library that is installed by Arduino Library Manager:

However, no changes were made to the code of the library since the time of the release, so it should be fine to use the release version and disregard the compatibility warning you might notice in the compilation output:

WARNING: library ArduinoECCX08 claims to run on samd, megaavr, mbed, mbed_nano, mbed_portenta, esp32 architecture(s) and may be incompatible with your current board which runs on mbed_giga architecture(s).