Getting Started with the ST SensorTile.box Sensor Kit (4) Programming Mode Experience
[Copy link]
This post was last edited by nich20xx on 2020-7-8 05:30
1 Introduction
SensorTile.box programming mode (Pro Mode) allows you to write/debug your own code on the SensorTile.box as needed to meet your needs for personalized functions.
2 Hardware Function Modules
The main control chip of SensorTile.box is STM32L4R9, equipped with a 500mAh lithium battery and an 8GB microSD card. The board integrates various sensors and a BLE module SPBTLE-1S. The onboard sensors include:
- STTS751 High Accuracy Temperature Sensor
- LSM6DSOXLow-power 6-axis inertial measurement unit (IMU) with built-in machine learning core (MLC)
- LIS3DHH and LIS2DW12 3-axis accelerometers
- LIS2MDL magnetometer
- LPS22HH Pressure Sensor/Altimeter
- MP23ABS1 Analog Microphone
- HTS221 Humidity Sensor
2.1 Main control chip STM32L4R9
The STM32L4R9 belongs to the STM32L4+ series.
Compared to the STM32L4 series, the STM32L4+ series offers superior performance (maximum frequency up to 120 MHz), larger embedded storage (up to 2 MB Flash memory and 640 KB SRAM), and richer graphics processing capabilities and connectivity features, while maintaining first-class ultra-low power consumption. The new STM32L4+ series also has built-in advanced graphics processing capabilities to achieve wonderful user graphical interfaces.
STM32L4+ functional block diagram
2.1.1 Programming and debugging methods
SensorTile.box provides two programming/debugging methods:
- JTAG direct programming
- Connect to ST-Link V2 or ST-LINK V3 programmer, Jlink, etc. through the JTAG interface on the board
- DFU firmware update (Device Fireware Update)
- Use the DFU function of STM32 by connecting PC via Micro USB
2.2.1 JTAG direct programming
- Connect to ST-Link V2 or ST-LINK V3 programmer, Jlink, etc. through the JTAG interface on the board
- Use IAR, MDK, ST-LINK Utility and other tools to directly burn the firmware
SensorTile.box JTAG interface
2.2.1 DFU Firmware Update
SensorTile.box Micro USB interface
- Use the ST BLE Sensor app on your phone to control the SensorTile.box to enter DFU mode (developer mode)
- Use the ST BLE Sensor app on your phone to find and connect to the SensorTile.box, and select "Open Debug Window" in the upper right corner.
- After entering the debug console, enter DFU to control the SensorTile.box to enter DFU mode
- Firmware update using STM32CubeProgrammer
- Open the SensorTile.box case, unplug the battery cable, press and hold the BOOT button, and then plug it into the computer via the USB data cable. The "STM32 BOOTLOADER" device will appear
- Open STM32CubeProgrammer, select USB on the right, CONNECT, and after the connection is successful, you can upgrade the bin file
- You can first read and back up the current firmware, click the drop-down box where "Read" is located, and select "Save As....
- Perform a full chip erase
- Open the bin file and download, "+"-->"Open file"-->"Download"
3 SensorTile.box software support package
The SensorTile.box programming mode provides the FP-SNS-STBOX1 software package, which mainly provides the following components:
- MEMS sensor devices: HTS221, LPS22HH, LIS2MDL, LSM6DSOX, STTS751, LIS3DHH, LIS2DW12
- analog microphone
- BlueNRG-1 Bluetooth Low Energy System On Chip
FP-SNS-STBOX1 currently includes the following application examples:
STM32CubeFunctionPack_STBOX1_V1.3.0\Projects\STM32L4R9ZI-SensorTile.box\Applications
- Applications
- Firmware Update
- BLEFOTA BLE firmware upgrade
- Secure (PIN) BLE Firmware Over The Air update (Must work with BootLoader example)
- BLEDualProgram
- Secure (PIN) BLE Firmware Over The Air update with Dual Boot option for Firmware Rollback
- BootLoader
- Boot Loader for enabling the Update of the code. The update could be in Flash or in SD-Card
- Sensor collection and BLE connection
- BLELowPowerRToS
- Collect sensor data to ST BLE Sensor app based on FreeRTOS
- Enable low power operation: The microcontroller can be set to sleep when no tasks are scheduled to execute
- BLESensors
- Collect sensor data to ST BLE Sensor app in front-end and back-end mode
- Machine Learning
- BLEMLC
- Machine Learning Core Demo (DecTree by Unico GUI)
- Example on how to program the LSM6DSOX Machine Learning Core (MLC) and Finite State Machine (FSM)
- Data storage
- SDDataLogRToS
- Enable max speed: The microcontroller can buffer the data read from the sensor while the write operation on the SD card is still in progress
- SD-Card data Log with FreeRTOS
- DataLogExtended
- Use USB virtual serial port to transfer sensor data to Unicleo graphical user interface on PC
4 References
- SensorTileBox_3_Programming Mode Introduction.pdf
- STM32Cube function pack for the Pro Mode of the SensorTile.box wireless multi sensor development kit
|