STMicroelectronics X-CUBE-53L3A2 User Manual

UM2812

User manual

Getting started with the X-CUBE-53L3A2 Time-of-Flight ranging sensor with multi target detection expansion software for STM32Cube

Introduction

This document describes how to get started with the X-CUBE-53L3A2 software expansion for STM32Cube.

The VL53L3CX is the latest Time-of-Flight (ToF) product from STMicroelectronics and embeds ST’s third generation FlightSense patented technology. It combines a high performance proximity and ranging sensor, with multi target distance measurements and automatic smudge correction. The miniature reflowable package integrates a single photon avalanche diode (SPAD) array and physical infrared filters to achieve the best ranging performance in various ambient lighting conditions, with a wide range of cover glass windows.

The VL53L3CX combines the benefits of a high-performance proximity sensor, with excellent short distance linearity, together with ranging capability up to 5 m.

With patented algorithms and ingenious module construction, the VL53L3CX is also able to detect different objects within the field of view (FoV) with depth understanding. The ST histogram algorithms allow cover glass crosstalk immunity beyond 80 cm, and dynamic smudge compensation.

X-CUBE-53L3A2 provides a complete software for STM32 to build applications using the VL53L3CX ToF sensor.

It is easily portable across different MCU families thanks to STM32Cube. This package contains a sample application to transmit the ranging data to a PC.

The software provides an implementation example for STM32 Nucleo platforms equipped with the X-NUCLEO-53L3A2 expansion board, featuring the distance ranging sensor.

The software is based on STM32Cube technology and expands STM32Cube based packages.

UM2812 - Rev 1 - January 2021

www.st.com

For further information contact your local STMicroelectronics sales office.

 

 

 

UM2812

Acronyms and abbreviations

1Acronyms and abbreviations

Acronym

Definition

BSP

board support package

 

 

GUI

graphical user interface

 

 

HAL

hardware abstration layer

 

 

I2C

inter-integrated circuit

 

 

MCU

microcontroller unit

 

 

SDK

software development kit

 

 

SPAD

single photon avalanche diode

 

 

ToF

Time-of-Flight

 

 

UM2812 - Rev 1

page 2/13

 

 

STMicroelectronics X-CUBE-53L3A2 User Manual

UM2812

What is STM32Cube?

2What is STM32Cube?

2.1STM32Cube overview

STMCube was originated by STMicroelectronics to ease developers’ life by reducing development effort, time and cost. STM32Cube covers the STM32 portfolio.

STM32Cube includes:

The STM32CubeMX, a graphical software configuration tool that allows to generate C initialization code using graphical wizards.

A comprehensive embedded software platform, delivered per series (such as STM32CubeF4 for STM32F4 series)

The STM32Cube HAL, an STM32 abstraction layer embedded software, ensuring maximized portability across STM32 portfolio

A consistent set of middleware components such as RTOS, USB, TCP/IP, graphics

A full set of examples for all embedded software utilities

Information about STM32Cube are available on www.st.com at: http://www.st.com/stm32cube

2.2STM32Cube architecture

The STM32Cube firmware solution is built around three independent levels that can easily interact with each other as illustrated in the figure below:

Figure 1. Firmware architecture

UM2812 - Rev 1

page 3/13

 

 

UM2812

STM32Cube architecture

Level 0

This level is divided into three sublayers:

Board Support Package (BSP): this layer offers a set of APIs relative to the hardware components in the hardware boards (Audio codec, IO expander, Touchscreen, SRAM driver, LCD drivers. etc…) and composed of two parts:

Component: is the driver relative to the external device on the board and not related to the STM32, the component driver provide specific APIs to the BSP driver external components and could be portable on any other board.

BSP driver: it permits to link the component driver to a specific board and provides a set of friendly used APIs. The APIs naming rule is BSP_FUNCT_Action(): e.g. BSP_LED_Init(),BSP_LED_On()

It’s based on modular architecture allowing to port it easily on any hardware by justimplementing the low level routines.

Hardware Abstraction Layer (HAL): this layer provides the low level drivers and the hardware interfacing methods to interact with the upper layers (application, libraries and stacks). It provides a generic, multi instance and functionality oriented APIs which permit to offload the user application implementation by providing ready to use process. For example, for the communication peripherals (I2S, UART…) it provides APIs allowing to initialize and configure the peripheral, manage data transfer based on polling, interrupt or DMA process, and manage communication errors that may raise during communication. The HAL drivers APIs are split in two categories:

generic APIs which provide common and generic functions to all the STM32 series

extension APIs which provide specific and customized functions for a specific family or a specific part number

Basic peripheral usage examples: this layer encloses the examples build over the STM32 peripheral using only the HAL and BSP resources.

Level 1

This level is divided into two sublayers:

Middleware components: set of libraries covering USB host and device libraries, STemWin, FreeRTOS, FatFS, LwIP, and PolarSSL. Horizontal interactions between the components of this layer is done directly by calling the feature APIs, while the vertical interaction with the low level drivers is done through specific callbacks and static macros implemented in the library system call interface. For example, the FatFs implements the disk I/O driver to access microSD drive or the USB mass storage class.

Examples based on the middleware components: each middleware component comes with one or more example (called also applications) showing how to use it. Integration examples that use several middleware components are provided as well.

Level 2

This level is composed of a single layer which is global real-time and graphical demonstration based on the middleware service layer, the low level abstraction layer and the basic peripheral usage applications for board based functionalities.

UM2812 - Rev 1

page 4/13

 

 

Loading...
+ 9 hidden pages