Dynamic nfc tag expansion board based on m24sr for stm32 nucleo (9 pages)
Summary of Contents for ST UM3019
Page 1
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. UM3019 - Rev 1 - April 2022 www.st.com For further information contact your local STMicroelectronics sales office.
On top, the application layer contains functions and procedures that characterize the application and can be changed by the end user. UM3019 - Rev 1 page 2/43...
(IAR Embedded Workbench for Arm, MDK-ARM, and STM32CubeIDE). Figure 2. FP-ATR-ASTRA1 folder structure APIs Detailed technical information with full user API function and parameter description is in a compiled HTML file in the “Documentation” folder. UM3019 - Rev 1 page 3/43...
The firmware library structure is modular to meet these requirements. The figure below shows how the data flow from the input to the output. UM3019 - Rev 1 page 4/43...
This is just an example of how a state machine can be implemented, changing the behavior of our device. Several intermediate states can also be implemented, balancing the system responsiveness and the battery life. UM3019 - Rev 1 page 5/43...
UM3019 State machine Figure 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 - Rev 1 page 6/43...
LP: go to low-power command. See the SM_APP.c file for further details. HMI using LEDs and buttons STEVAL-ASTRA1B is provided with an RBG user LED and two user buttons: • power/side button • frontal button UM3019 - Rev 1 page 7/43...
– 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 - Rev 1 page 8/43...
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 - Rev 1 page 9/43...
The MX_Astra_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 - Rev 1 page 10/43...
The Init functions are implemented in the Astra_confmng.c/.h file and the process functions are implemented in the Astra_datamng.c/.h file. 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 - Rev 1 page 11/43...
ReadSensors(); ManageSensorsEvents(); for sensor input • saved in the RAM and/or EEPROM memory • AstraEngData_t to store the latest acquired data The AstraEngData_t structure is globally accessible. The following code is used for the AstraEngData_t event data. UM3019 - Rev 1 page 12/43...
The following code is used for the AstraEngData_t ADC data. /* ADC */ uint16_t batteryVoltage; uint16_t USBVoltage; uint32_t nFwVersion; } AstraEngData_t; SM_APP.c/.h These files contain the configuration structures of state machine. Section 2.2 for more details. UM3019 - Rev 1 page 13/43...
There are maximum three option bytes available. The firmware developer can define their meaning to convey different types of information. The developer also translates each byte and its meaning (for example, the mobile application according to the mapping table defined in the json file). UM3019 - Rev 1 page 14/43...
(for example, firmware version, firmware name, implemented characteristics, etc.). Data exchange ® The Bluetooth Low Energy manager configures the device characteristics according to the data exchanged with ® the Bluetooth Low Energy master. STEVAL-ASTRA1B configured characteristics are: UM3019 - Rev 1 page 15/43...
Page 16
– 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 - Rev 1 page 16/43...
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 • analog and digital input UM3019 - Rev 1 page 17/43...
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 - Rev 1 page 18/43...
In this way, you automatically register the LoRAWAN device on the TTN V3 network server linked to DSH-ASSETRACKING. ® STM32WB5MMG UID and the STM32WL55JC EUI are transmitted through Bluetooth Energy (for further details, see custom command parameters for keys). UM3019 - Rev 1 page 19/43...
® 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 - Rev 1 page 20/43...
Select [DATA HISTORY] to get graphs about the sensor data history of the device. Figure 20. STEVAL-ASTRA1B data history STAssetTracking standard and custom commands From the [Settings] view, you can access the [Board Configuration] tab. UM3019 - Rev 1 page 21/43...
UM3019 STAssetTracking standard and custom commands Figure 21. Board configuration From [Board Report], you can access the board and the firmware information. Figure 22. Board report command UM3019 - Rev 1 page 22/43...
To get more specific information, access the [Custom Commands] view. 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 - Rev 1 page 23/43...
UM3019 STAssetTracking standard and custom commands Figure 25. System commands - details The LoraWAN status and information are also available on the custom command tab. Figure 26. System Command - LoRA config UM3019 - Rev 1 page 24/43...
To access the debug console, refer to Section 7 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 - Rev 1 page 25/43...
For 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 - Rev 1 page 27/43...
UM3019 CLI, command line interface, and debug console on Bluetooth® Low Energy and USB Figure 32. Debug console - PC view (2 of 3) Figure 33. Debug console - PC view (3 of 3) UM3019 - Rev 1 page 28/43...
Low Energy manager 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 - Rev 1 page 29/43...
Page 30
X is the verbosity level. The allowed values are: LEVEL_TERMINAL !verbosity Set verbosity level LEVEL_ERROR LEVEL_CRITICAL LEVEL_VERBOSE LEVEL_INFO !sysreset System reset It forces a system reset It forces a system reboot in USB !sysdfu System DFU mode DFU mode UM3019 - Rev 1 page 30/43...
Page 31
Get the debug mode It gets the debug level. !sysrun Set system state to run It moves the system state to run Set system state to low It moves the system state to low !syslp power power UM3019 - Rev 1 page 31/43...
Page 32
ASCII command Short help Set/Get Description It sets the use case. Usage: usecase-X where X is the use case number. The allowed values are: 0 FLEET_MNG !usecase Set ATR use case LIVESTOCK_MON GOODS_MONITORING LOGISTICS CUSTOM UM3019 - Rev 1 page 32/43...
How to update the STM32WB5MMG M0+ core via STLINK-V3MINI To download the application code into the STM32WB5MMG M0+ core via STLINK-V3MINI, follow the procedure below. Step 1. Check the programming jumper position according to UM2966, table 5. UM3019 - Rev 1 page 33/43...
USB or firmware updgrade via STLINK-V3MINI. The bootloader binary file is “StevalAstra1B_BLE_Ota.hex”, which is inside the "Binaries" folder. Step 1. Open the STBLESensor app and connect your board. UM3019 - Rev 1 page 34/43...
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 - Rev 1 page 36/43...
Use the STM32CubeProgrammer programmer and download the LoRaWAN_AT_Slave_V1.X.X.hex file. 8.2.2 How to update the STM32WL55JC M0+ core via STLINK-V3MINI To download the application code into the STM32WL55JC M0+ core via STLINK-V3MINI, refer to AN5185. UM3019 - Rev 1 page 37/43...
FUOTA for the M0+ core ............37 UM3019 - Rev 1...
Page 43
ST’s terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’...
Need help?
Do you have a question about the UM3019 and is the answer not in the manual?
Questions and answers