ST UM3019 Скачать руководство пользователя страница 1

Introduction

The 

FP-ATR-ASTRA1

 is an 

STM32Cube

 function pack that implements a complete asset tracking application,

which supports long-range connectivity and short-range connectivity. This application reads the data from the
environmental and motion sensors, retrieves the geo-position from GNSS and sends them to the cloud using
Bluetooth

®

 Low Energy and LoRaWAN connectivity.

The 

FP-ATR-ASTRA1

 package supports low-power profiles and the related transitions to ensure long battery

autonomy. Moreover, it provides key features such as secure element management, the possibility to add custom
algorithms, debugging interfaces, and expansion capability.
The firmware is available as a standard source code .zip file.

 Getting started with the STM32Cube function pack for IoT tracker node with 

Bluetooth® Low Energy, LoRa, NFC connectivity, GNSS and sensors

UM3019

User manual

UM3019

 - 

Rev 1

 - 

April 2022

For further information contact your local STMicroelectronics sales office.

www.st.com

Содержание UM3019

Страница 1: ...R ASTRA1 package supports low power profiles and the related transitions to ensure long battery autonomy Moreover it provides key features such as secure element management the possibility to add custom algorithms debugging interfaces and expansion capability The firmware is available as a standard source code zip file Getting started with the STM32Cube function pack for IoT tracker node with Blue...

Страница 2: ...TRA1 compliant with the STM32Cube architecture is structured into a set of layers of increasing abstraction The hardware abstraction layer HAL interfaces with the hardware It provides the low level drivers and the hardware interface methods to interact with the upper layers application libraries and stacks It also provides the APIs for the communication peripherals I C SPI UART etc for initializat...

Страница 3: ...h supported board or hardware platform including the on board components and the CMSIS vendor independent hardware abstraction layer for the Arm Cortex M processor series Middleware contains libraries and protocols for the USB communication STM32 WPAN GNSS NMEA Parson library Bluetooth Low Energy manager STSAFE sequencer and low power manager Projects contains sample application used to implement ...

Страница 4: ...uetooth Low Energy sending interval Indoor only GNSS disabled Algorithm 1 Data logging 2 Fleet management 40 s 100 ms N No Yes Livestock monitoring 60 s 500 ms N Motion No Goods monitoring 3600 s 200 ms Y Geofence Yes Logistics 20 s 1000 ms N No Yes Custom 30 s 400 ms N No Yes 1 Only an empty callback is available It has to be filled by the user See the manageAlgorithms function in the source code...

Страница 5: ... has been implemented featuring two states full run state and low power state These states are not related to the MCU power state but to the whole system condition A minimum and a maximum performance and consequently power consumption characterize these states In the full run state everything is on and all the data are sent to the dashboard In the low power state all the components except the MCU ...

Страница 6: ... 5 State machine functional diagram The figure below shows the detailed flow diagram of the process referring to the code implementation Figure 6 State machine flow UM3019 State machine UM3019 Rev 1 page 6 43 ...

Страница 7: ...tes the module in the low power state GNSS memory and sensors are turned off while the other modules are in low power The events are BP button pressed event SD shutdown event ER error event EP automatic transition to next step RN go to full run command LP go to low power command See the SM_APP c file for further details 2 3 HMI using LEDs and buttons The STEVAL ASTRA1B is provided with an RBG user...

Страница 8: ...inking if the Bluetooth Low Energy is not connected with fast blinking if the Bluetooth Low Energy is connected yellow if the Bluetooth Low Energy is connected and sending the frontal button short press triggers asynchronous LoRa end data long press system shutdown the side button short press changes the low power status to run or vice versa long press system reboot UM3019 HMI using LEDs and butto...

Страница 9: ...on files 3 1 App_astra c The app_astra c file is the main file that is the entry point It calls the initialization functions inside MX_Astra_Init Specific defines allow disabling some blocks for example USE_XXXXXX The MX_Astra_Init function is used for the system initialization AstraSysInit platform data initialization memory_init sensor_init gnss_init stm32wl_init stsafe_init UM3019 FP ATR ASTRA1...

Страница 10: ...stra_Process function is used for the main loop ASTRA_TASK_ID the main sequencer task calls the process function related to each module ManageMemory ReadSensors ReadGnss stm32wl_process stsafe_process UM3019 App_astra c UM3019 Rev 1 page 10 43 ...

Страница 11: ...d the process functions are implemented in the Astra_datamng c h file 3 2 Astra_confmng c h This is the board configuration manager with the variables selected by the user to enable disable each hardware block and use case implementation and configuration UM3019 Astra_confmng c h UM3019 Rev 1 page 11 43 ...

Страница 12: ...ated for example to run a specific algorithm on the data There is a globally accessible C structure the AstraEngData where the data are available anytime The data are acquired from each module for example stm32wl_process for input output on LoRa ReadSensors ManageSensorsEvents for sensor input saved in the RAM and or EEPROM memory AstraEngData_t to store the latest acquired data The AstraEngData_t...

Страница 13: ...ongitude float gnss_altitude int32_t gnss_sats uint8_t gnss_fix_validity sensors MOTION_SENSOR_Axes_t AccValue MOTION_SENSOR_Axes_t LPAccValue MOTION_SENSOR_Axes_t GyrValue float LPTempValue float PressValue float TempValue float HumValue MOTION_SENSOR_Event_Status_t LPAccInt MOTION_SENSOR_Event_Status_t AccInt The following code is used for the AstraEngData_t ADC data ADC uint16_t batteryVoltage ...

Страница 14: ...re to advertise its capabilities and exchange data with mobile applications as well as industrial gateways via Bluetooth Low Energy It is shared as an open source code on multiple Github repositories for Android iOS and Python The following figure shows the advertise frame format Figure 13 Advertise format We assume that the mobile application or the gateway which receives the advertisement and ne...

Страница 15: ... Info for example Lora Joined GNSS off etc Figure 14 STEVAL ASTRA1B advertise The STAssetTracking app adds other information as soon as the board is recognized The related information is gathered from a json file downloaded from the web server for example firmware version firmware name implemented characteristics etc 4 2 Data exchange The Bluetooth Low Energy manager configures the device characte...

Страница 16: ...tput errors from the application error messages are highlighted among the traces receive user textual input for human interaction refer to Section 7 for USB commands and debug extended configuration characteristic configuration commands exchanged in json format for further details see Section 6 UM3019 Data exchange UM3019 Rev 1 page 16 43 ...

Страница 17: ...ng app can set the LoRaWAN keys through specific commands The keys are stored in the EEPROM without KMS A simplified provisioning procedure through the STAssetTracking app automatically sets the needed keys to register them on TTN V3 and on the DSH ASSETRACKING dashboard The LoRaWAN frame payload is in Cayenne LPP format and consists of pressure temperature and humidity accelerometer GNSS location...

Страница 18: ... STEVAL ASTRA1B board to join the LoRaWAN network you need to use the STAssetTracking together with the DSH ASSETRACKING dashboard 6 1 How to connect the STEVAL ASTRA1B to a LoRaWAN network You need a my st com account to install the STAssetTracking app After the installation follow the procedure below to log on to the app and the DSH ASSETRACKING dashboard UM3019 Using the STEVAL ASTRA1B with the...

Страница 19: ...is way you automatically register the LoRAWAN device on the TTN V3 network server linked to DSH ASSETRACKING The STM32WB5MMG UID and the STM32WL55JC EUI are transmitted through Bluetooth Low Energy for further details see custom command parameters for keys UM3019 How to connect the STEVAL ASTRA1B to a LoRaWAN network UM3019 Rev 1 page 19 43 ...

Страница 20: ...w Energy Figure 18 STEVAL ASTRA1B registration 4 of 4 The STEVAL ASTRA1B board can join the LoRaWAN network as soon as it is available After joining it can start sending data to the dashboard The dashboard receives data from LoRa and Bluetooth Low Energy with different acquisition frequencies The smartphone stores the Bluetooth Low Energy data before sending them to the dashboard UM3019 How to con...

Страница 21: ... corner to view the identified location on the map Figure 19 STEVAL ASTRA1B data Step 5 Select DATA HISTORY to get graphs about the sensor data history of the device Figure 20 STEVAL ASTRA1B data history 6 2 STAssetTracking standard and custom commands From the Settings view you can access the Board Configuration tab UM3019 STAssetTracking standard and custom commands UM3019 Rev 1 page 21 43 ...

Страница 22: ...ure 21 Board configuration From Board Report you can access the board and the firmware information Figure 22 Board report command UM3019 STAssetTracking standard and custom commands UM3019 Rev 1 page 22 43 ...

Страница 23: ...iew Figure 23 Custom commands In the Custom Commands the System commands option allows viewing configuring the system parameter GNSS the sensor configuration etc Figure 24 System commands UM3019 STAssetTracking standard and custom commands UM3019 Rev 1 page 23 43 ...

Страница 24: ...stem commands details The LoraWAN status and information are also available on the custom command tab Figure 26 System Command LoRA config UM3019 STAssetTracking standard and custom commands UM3019 Rev 1 page 24 43 ...

Страница 25: ...fer to the figure below Figure 28 Debug console To access the debug console refer to Section 7 6 4 Asset tracking dashboard access and views The following figures show an overview of the dashboard For further details go to the relevant web page DSH ASSETRACKING UM3019 Debug console setting and access UM3019 Rev 1 page 25 43 ...

Страница 26: ...Figure 29 DSH ASSETRACKING login Figure 30 DSH ASSETRACKING views UM3019 Asset tracking dashboard access and views UM3019 Rev 1 page 26 43 ...

Страница 27: ...r the USB interface the communication device class CDC class virtual COM port is used It provides an input output communication channel for reading and writing via a serial terminal on a PC and or a smartphone For further details see UM2966 Figure 31 Debug console PC view 1 of 3 UM3019 CLI command line interface and debug console on Bluetooth Low Energy and USB UM3019 Rev 1 page 27 43 ...

Страница 28: ...Figure 32 Debug console PC view 2 of 3 Figure 33 Debug console PC view 3 of 3 UM3019 CLI command line interface and debug console on Bluetooth Low Energy and USB UM3019 Rev 1 page 28 43 ...

Страница 29: ... implements this characteristic and is able to exchange the user textual data The debug console is also available over Bluetooth Low Energy using the STBLESensor app the STAssettracking app does not support this feature Figure 35 Debug console app view UM3019 CLI command line interface and debug console on Bluetooth Low Energy and USB UM3019 Rev 1 page 29 43 ...

Страница 30: ... a command execution this ensures that the command response is not overtaken by other traces As a general rule the command behavior is identified by the first character is the starting character for the get commands is the starting character for the set commands The following table lists the implemented commands with some additional information with respect to the brief description available with ...

Страница 31: ...eport Usage gnssreport X where X is the on off word Thus the allowed values are on off gnssnmea GNSS set NMEA printout S It enables disables the NMEA printout Usage gnssnmea X where X is the on off word Thus the allowed values are on off stop Stop firmware execution S It stops the firmware execution loraconf Set LoRa firmware configuration S It sets the LoRa mode Usage loraconf X where X is the Lo...

Страница 32: ... S It sets the use case Usage usecase X where X is the use case number The allowed values are 1 0 FLEET_MNG 2 LIVESTOCK_MON 3 GOODS_MONITORING 4 LOGISTICS 5 CUSTOM UM3019 CLI command line interface and debug console on Bluetooth Low Energy and USB UM3019 Rev 1 page 32 43 ...

Страница 33: ...programming connector J300 see UM2966 section 2 2 for further information Step 3 As the STEVAL ASTRA1B loads a preprogrammed bootloader to download your customized code without overwriting the bootloader use the following file stm32wb55xx_flash_cm4_ota icf linker file to set the correct flash memory address space in IAR Step 4 Use STM32CubeProgrammer to update the firmware by choosing one binary f...

Страница 34: ...tep 1 Put STM32WB5MMG in the boot mode by sending the sysdfu command Step 2 Use STM32CubeProgrammer to program the stm32wb5x_BLE_Stack_full_fw bin firmware Refer to the Projects STEVALASTRA1B Applications AssetTracking Binaries STM32WB_Copro_Wireless_Binaries _STM32WB5x zip folder which contains the stm32wb5x_BLE_Stack_full_fw bin and the instructions to program the firmware For further details se...

Страница 35: ...Step 2 Go to the Firmware Upgrade section Figure 37 FUOTA procedure Step 3 Select the application coprocessor binary M4 core UM3019 STM32WB5MMG firmware upgrade UM3019 Rev 1 page 35 43 ...

Страница 36: ... the M4 core 8 1 6 Firmware upgrade over the air FUOTA for the STM32WB5MMG M0 core To download the application code into the STM32WB5MMG M0 core via FUOTA follow the procedure below Step 1 Open the STBLESensor app and connect your board Step 2 Go to the Firmware Upgrade section Step 3 Select the application coprocessor binary M0 core UM3019 STM32WB5MMG firmware upgrade UM3019 Rev 1 page 36 43 ...

Страница 37: ...jumper position according to UM2966 table 5 Step 2 Connect the STLINK V3MINI to the STEVAL ASTRA1B programming connector J300 see UM2966 section 2 2 for further information Step 3 Suspend the LoRa processing on the STM32WL55JC Step 3a Send the loraconf 0 command through the debug console USB or via Bluetooth Low Energy in the STBLESensor app Step 3b Issue the custom command Board settings Read cus...

Страница 38: ...Revision history Table 3 Document revision history Date Revision Changes 22 Apr 2022 1 Initial release UM3019 UM3019 Rev 1 page 38 43 ...

Страница 39: ...SSETRACKING dashboard 18 6 1 How to connect the STEVAL ASTRA1B to a LoRaWAN network 18 6 2 STAssetTracking standard and custom commands 21 6 3 Debug console setting and access 25 6 4 Asset tracking dashboard access and views 25 7 CLI command line interface and debug console on Bluetooth Low Energy and USB 27 8 Firmware upgrade 33 8 1 STM32WB5MMG firmware upgrade 33 8 1 1 How to update the STM32WB5...

Страница 40: ... 8 2 1 How to update the STM32WL55JC M4 or single core via STLINK V3MINI 37 8 2 2 How to update the STM32WL55JC M0 core via STLINK V3MINI 37 Revision history 38 List of tables 41 List of figures 42 UM3019 Contents UM3019 Rev 1 page 40 43 ...

Страница 41: ...List of tables Table 1 Use cases 4 Table 2 CLI command list 30 Table 3 Document revision history 38 UM3019 List of tables UM3019 Rev 1 page 41 43 ...

Страница 42: ...1B registration 3 of 4 20 Figure 18 STEVAL ASTRA1B registration 4 of 4 20 Figure 19 STEVAL ASTRA1B data 21 Figure 20 STEVAL ASTRA1B data history 21 Figure 21 Board configuration 22 Figure 22 Board report command 22 Figure 23 Custom commands 23 Figure 24 System commands 23 Figure 25 System commands details 24 Figure 26 System Command LoRA config 24 Figure 27 System command tab LoRA configuration de...

Страница 43: ...ts and ST assumes no liability for application assistance or the design of purchasers products No license express or implied to any intellectual property right is granted by ST herein Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product ST and the ST logo are trademarks of ST For additional information about ST...

Отзывы: