Skip to content

1. Chip Identification Example Tutorial

This example demonstrates how to read and display the chip’s unique ID and firmware version information (bootloader, application and SPECT firmware versions). You will learn about the following functions:

  • lt_reboot(): L2 request to reboot to either Application or Maintenance Mode,
  • lt_get_info_riscv_fw_ver(), lt_get_info_spect_fw_ver(): L2 requests to read RISC-V CPU and SPECT firmware versions,
  • lt_get_info_chip_id(): L2 request to read chip identification (e.g., serial number).

Build and Run

Building and running the example

Go to the example's project directory:

cd examples/linux/spi/identify_chip/

Create a build/ directory and switch to it:

mkdir build/
cd build/

And finally, build and run the example:

cmake ..
make
./libtropic_identify_chip

TBA

TBA

After this, you should see an output in your terminal.

Configuration

In addition to the Libtropic CMake options used to configure Libtropic, this example provides the following CMake options:

  • LT_SPI_DEV_PATH (default: "/dev/spidev0.0") specifies the path to the SPI device to which the TROPIC01 is connected:

    Configuring SPI device path
    cmake -DLT_SPI_DEV_PATH=<spi_dev_path> ..
    make
    ./libtropic_identify_chip
    

    TBA

    TBA

  • LT_GPIO_DEV_PATH (default: "/dev/gpiochip0") specifies the path to the GPIO device to which TROPIC01's interrupt (INT) and Chip Select (CS) lines are connected:

    Configuring GPIO device path
    cmake -DLT_GPIO_DEV_PATH=<gpio_dev_path> ..
    make
    ./libtropic_identify_chip
    

    TBA

    TBA

Next example