TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137103 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56126 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42079 times)
  6. FT800 Library (41389 times)
  7. GSM click (29118 times)
  8. mikroSDK (26564 times)
  9. PID Library (26503 times)
  10. microSD click (25487 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Secure 5 click

Rating:

0

Author: MIKROE

Last Updated: 2019-10-03

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Encryption

Downloaded: 306 times

Not followed.

License: MIT license  

Secure 5 Click carries the ATECC508A cryptographic coprocessor with secure hardware-based key storage, from Microchip. The ATECC508A includes an EEPROM array which can be used for storage of up to 16 keys, certificates, miscellaneous read/write, read-only or secret data, consumption logging, and security configurations.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Secure 5 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Secure 5 click" changes.

Do you want to report abuse regarding "Secure 5 click".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Secure 5 click

Secure 5 click

Native view of the Secure 5 click board.

View full image
Secure 5 click

Secure 5 click

Front and back view of the Secure 5 click board.

View full image

Library Description

The library demonstrates the operation of the software single wire interface implementation.

Key functions:

  • int8_t secureswi_init(T_SECURESWI_DIRSET inSet, T_SECURESWI_DIRSET outSet) - Initialize the SWI interface and pass the pin direction setting functions.
  • void secureswi_sendBytes(uint8_t len,uint8_t *stBuf) - Encode data buffer and send the data to the SWI bus.
  • void secureswi_receiveBytes(uint8_t len,uint8_t *stBuf) - Receive and decode data from the SWI bus.

Examples description

The application is composed of three sections :

  • System Initialization - Initialize the GPIO sturcture and configure the serial port for logging data.
  • Application Initialization - Initialize the driver and configure swi for communication.
  • Application Task - Data is read from the secure chip. If the readout is successful the data is then printed on the serial port in the hex format.
void applicationTask()
{
     uint8_t bufferOut[128];

     cfg_atsha204a_swi_default.iface_type  = ATCA_SWI_IFACE;
     cfg_atsha204a_swi_default.devtype     = ATSHA204A;
     cfg_atsha204a_swi_default.atcaswi.bus = 1;
     cfg_atsha204a_swi_default.wake_delay  = 2560;
     cfg_atsha204a_swi_default.rx_retries  = 10;

     atcab_init(&cfg_atsha204a_swi_default);

     mikrobus_logWrite("Starting test",_LOG_LINE);

     memset(bufferOut,0,127);

     if (atcab_read_serial_number(bufferOut) == ATCA_SUCCESS)
     {
         mikrobus_logWrite("rn Serial number: ",_LOG_LINE);
         secureswi_printHex(bufferOut,9);
     }
     else
     {
         mikrobus_logWrite("rn Reading serial number failed...",_LOG_LINE);
         secureswi_printHex(bufferOut,sizeof(bufferOut));
     }

     Delay_ms (1500);
     memset (bufferOut, 0x00, 128);
     if (atcab_read_config_zone(bufferOut) == ATCA_SUCCESS)
     {
        mikrobus_logWrite("rnrn First 32 bytes of device configuration: ",_LOG_LINE);
        secureswi_printHex(bufferOut,32);
     }
     else
     {
        mikrobus_logWrite("rnrn Reading config zone failed...",_LOG_LINE);
        secureswi_printHex(bufferOut,sizeof(bufferOut));
     }

     while(1)
     {

     }
}

Other mikroE Libraries used in the example:

  • Conversions
  • C_String
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

BOOST click

0

Boost click provides an adjustable output voltage through the onboard DAC that drives the FB pin of the MIC2606 to set desired output voltage.

[Learn More]

IoT ExpressLink click

0

IoT ExpressLink Click is a compact add-on board that allows users to easily connected to IoT ExpressLink services and securely interact with cloud applications and other devices. This board features the ESP32-C3-MINI-1-N4-A, a small 2.4GHz WiFi (802.11 b/g/n) and Bluetooth® 5 module from Espressif Systems that use ESP32C3 series of SoC RISCV single-core microprocessor (ESP32-C3FN4) with 4MB flash in a single chip package. The module uses UART communication alongside several other features like the JTAG interface, module wake-up, various operational event detection, additional UART for debugging, and others.

[Learn More]

Color 3 click

1

Color 3 click is a mikroBUS add-on board with a TCS3771 color sensor (also known as a light-to-digital converter) and a narrow beam Infrared LED. The circuit can also function as a proximity sensor. TCS3771 is a RGBC sensor: it can detect Red, Green, Blue and clear light. The IC performs well under a variety of lighting conditions.

[Learn More]