Skip to content

Libraries

Frederic Pillon edited this page May 28, 2024 · 25 revisions

Libraries using basic features like Serial, SPI, I2C,... should be fully compatible with STM32 core. Pin updates could be required in the sketch.

/img/Warning-icon.png Arduino boards provide ICSP connector used by several Arduino shields for SPI signal: MISO/MOSI/SCK. STM32 boards do not have this ICSP connector, so this requires to manually wire those SPI signals to the desired pin (mainly: D11 to D13)

/img/Note-icon.png All dedicated STM32 libraries are available through the "Library Manager" or have a look hereafter to see which one is available:

Built-in (delivered with the core package)

  • EEPROM: follow the official EEPROM API
  • Servo: follow the official Servo API
  • SoftwareSerial: follow the official SoftwareSerial API.
    It uses an hardware timer. Interrupt is triggered at a frequency = Baudrate * OVERSAMPLE (by default 3*baudrate) to handle RX as well as TX transmissions. This impacts CPU load specially at high baudrate.
  • SPI: follow the official SPI API
  • Wire (I2C): follow the official Wire API

Dedicated

Some libraries have been developed to support specific features (hardware or not):

  • STM32Ethernet: for on board Ethernet port (ex: Nucleo-F429ZI). This library is fully compatible with Arduino Ethernet API. It depends on the following libraries:

    • LwIP: lightweight TCP/IP stack (LwIP) is a small independent implementation of the TCP/IP protocol suite

    Dedicated Wiki page

  • STM32FreeRTOS: this is a port of FreeRTOS for STM32 as Arduino libraries

  • STM32LowPower: to support some STM32 low power mode. It depends on the following libraries:

  • STM32RTC: to support the real-time clock (RTC) controller embedded in the STM32 microcontrollers. It is based on the Arduino RTCZero library

  • STM32SD: to support SDIO or SDMMC controller for board with SD card slot (ex: Disco-F746). This library is fully compatible with Arduino SD API. It depends on the following libraries:

    • FatFS: FatFs is a generic FAT file system module for small embedded systems. The FatFs is written in compliance with ANSI C and completely separated from the disk I/O layer. Therefore it is independent of hardware architecture
  • HTS221: to support the HTS221 capacitive digital sensor for relative humidity and temperature. Dedicated Wiki page

  • IIS2MDC: to support the IIS2MDC high-performance 3-axis magnetometer

  • ISM330DLC: to support the ISM330DLC 3D accelerometer and 3D gyroscope

  • LIS2DW12: to support the LIS2DW12 3D accelerometer

  • LIS2MDL: to support the LIS2MDL high-performance 3-axis magnetometer

  • LIS3DHH: to support the LIS3DHH 3D accelerometer

  • LIS3MDL: to support the LIS3MDL high-performance 3-axis magnetometer. Dedicated Wiki page

  • LPS22HB: to support the LPS22HB 260-1260 hPa absolute digital output barometer. Dedicated Wiki page

  • LPS25HB: to support the LPS25HB 260-1260 hPa absolute digital output barometer

  • LPS22HH: to support the LPS22HH 260-1260 hPa absolute digital output barometer

  • LSM303AGR: to support the LSM303AGR 3D accelerometer and 3D magnetometer

  • LSM6DSO: to support the LSM6DSO 3D accelerometer and 3D gyroscope

  • LSM6DSOX: to support the LSM6DSOX 3D accelerometer and 3D gyroscope

  • LSM6DS0: to support the LSM6DS0 3D accelerometer and 3D gyroscope

  • LSM6DS3 : to support the LSM6DS3 3D accelerometer and 3D gyroscope

  • LSM6DSL: to support the LSM6DSL 3D accelerometer and 3D gyroscope. Dedicated Wiki page

  • M24SR64-Y: to support the dynamic NFC/RFID Tag IC dual interface M24SR64-Y. Dedicated Wiki page

  • MX25R6435F: to support the Quad-SPI NOR Flash memory MX25R6435F. Dedicated Wiki page

  • Proximity Gesture: o support gesture-detection using proximity sensors (VL53L0X or VL53L1X or VL6180X). The APIs provide single swipe gesture detection, directional (left/right) swipe gesture detection and single tap gesture detection

  • SPBTLE-RF: to support the Bluetooth (V4.1 compliant) SPBTLE-RF. Dedicated Wiki page

  • ST25DV: to support the ST25DV components

  • STTS22H: to support the STTS22H digital temperature sensor

  • STTS751: to support the STTS751 digital temperature sensor

  • VL53L0X: to support the VL53L0X Time-of-Flight and gesture-detection sensor. Dedicated Wiki page

  • VL53L1X: to support the VL53L1X Time-of-Flight and gesture-detection sensor

  • VL6180X: to support the VL6180X proximity and ambient light sensing (ALS) sensor

  • WiFi-ISM43362-M3G-L44: to support the Wi-Fi module Inventek ISM43362-M3G-L44 (802.11 b/g/n)

  • S2-LP: to support the S2-LP sub-1GHz transceiver

  • VL53L1: to support the VL53L1 Time-of-Flight ranging sensor with advanced multi-zone and multi-object detection

  • VL53L3CX: to support the VL53L3CX Time-of-Flight ranging sensor with multi target detection

Expansion boards

Hereafter, an exhaustive list of Arduino libraries to support X-NUCLEO Expansion Boards. These libraries are guaranteed to work fine with all NUCLEO boards supported in the STM32 Core. They could also work with standard Arduino boards but I suggest to check before electrical and pinout compatibility of X-NUCLEO Expansion Boards with standard Arduino boards.

  • X-NUCLEO-53L0A1: it is an expansion board for the STM32 Nucleo based on VL53L0X Time-of-Flight and gesture-detection sensor. It depends on the following libraries:

  • X-NUCLEO-53L1A1: it is an expansion board for the STM32 Nucleo based on VL53L1X Time-of-Flight and gesture-detection sensor. It depends on the following libraries:

  • X-NUCLEO-6180XA1: it is an expansion board for the STM32 Nucleo based on VL6180X proximity sensor, gesture and ambient light sensing (ALS) module. It depends on the following libraries:

  • X-NUCLEO-GNSS1A1: to support the X-NUCLEO-GNSS1A1 expansion board using the TESEO-LIV3F module. It depends on the following libraries:

/img/Note-icon.png In order to perform the firmware upgrade, the following Java application should be used:

  • Teseo-LIV3F-Flash-Updater

  • X-NUCLEO-IDB05A1: it is a Bluetooth Low Energy evaluation board based on the SPBTLE-RF BlueNRG-MS RF module. It depends on the following library:

  • X-NUCLEO-IKA01A1: it is a multifunctional expansion board based on operational amplifiers.

  • X-NUCLEO-IKS01A1: it is a motion MEMS and environmental sensor expansion board for the STM32 Nucleo. It depends on the following libraries:

  • X-NUCLEO-IKS01A2: it is a motion MEMS and environmental sensor expansion board for the STM32 Nucleo. It depends on the following libraries:

  • X-NUCLEO-IKS01A3: it is a motion MEMS and environmental sensor expansion board for the STM32 Nucleo. It depends on the following libraries:

  • X-NUCLEO-IHM02A1: it is a two axis stepper motor driver expansion board based on the L6470 component.

  • X-NUCLEO-IHM12A1: it is a low voltage dual brush DC motor driver expansion board based on the STSPIN240.

  • X-NUCLEO-LED61A1: it is an expansion board based on the LED6001 component.

  • X-NUCLEO-NFC01A1: it is a Dynamic NFC tag evaluation board based on the M24SR64-Y NFC Type 4/RFID tag IC. It depends on the following library:

  • X-NUCLEO-NFC03A1: it is an NFC card reader evaluation board based on CR95HF-VMD5T that supports the detection, reading and writing of NFC Forum Type 1, 2, 3 and 4 tags.

  • X-NUCLEO-NFC04A1: it is a dynamic NFC/RFID tag IC expansion board based on the ST25DV04K NFC Type V/RFID tag IC. It depends on the following library:

  • X-NUCLEO-S2868A1: it is a wireless sub-1 GHz expansion board based on S2-LP radio and operates in the 868 MHz ISM frequency band. It depends on the following libraries:

  • X-NUCLEO-S2868A2: it is a wireless sub-1 GHz expansion board based on S2-LP radio and operates in the 868 MHz ISM frequency band. It depends on the following libraries:

  • X-NUCLEO-S2915A1: it is a wireless sub-1 GHz expansion board based on S2-LP radio and operates in the 915 MHz ISM frequency band. It depends on the following libraries:

  • X-NUCLEO-53L1A2: it is an expansion board for the STM32 Nucleo based on VL53L1 Time-of-Flight ranging sensor with advanced multi object detection. It depends on the following libraries:

  • X-NUCLEO-53L3A2: it is an expansion board for the STM32 Nucleo based on VL53L3CX Time-of-Flight ranging sensor with multi target detection. It depends on the following libraries:

  • X-NUCLEO-IHM05A1: it is a bipolar stepper motor driver expansion board based on the L6208 component.

Other expansion board

  • I-NUCLEO-LRWAN1: to support I-NUCLEO-LRWAN1 LoRa® expansion board based on USI® LoRaWAN™ technology module

Herafter, a non exhaustive list of libraries known as compatible with the STM32 core.

Official from Arduino

Third party

ARDUINO_ARCH_STM32 must be used as differentiator.

Tested

Clone this wiki locally