Download Print this page
ST STM32Cube Quick Start Manual

ST STM32Cube Quick Start Manual

Function pack for stevalstwinbx1 evaluation kit for high speed datalogging and ultrasound processing
Hide thumbs Also See for STM32Cube:

Advertisement

Quick Links

Quick Start Guide
STM32Cube function pack for STEVAL-
STWINBX1 evaluation kit for high speed
datalogging and ultrasound processing
(FP-SNS-DATALOG2)
Version 1.0

Advertisement

loading
Need help?

Need help?

Do you have a question about the STM32Cube and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ST STM32Cube

  • Page 1 Quick Start Guide STM32Cube function pack for STEVAL- STWINBX1 evaluation kit for high speed datalogging and ultrasound processing (FP-SNS-DATALOG2) Version 1.0...
  • Page 2 Agenda Hardware and Software overview Setup & Demo Examples Documents & Related Resources...
  • Page 3: Hardware And Software Overview

    1- Hardware and Software overview...
  • Page 4: Hardware Overview

    The STWIN.box kit consists of an STWIN.box core system, a 480mAh LiPo battery, an adapter for the ST-LINK debugger (STEVAL-MKIGIBV4), a plastic case, an adapter board for DIL 24 sensors and a flexible cable.
  • Page 5 A plastic case with M3 bolts; (V2, V2.1) STLINK Adapter • A 480 mAh 3.7 V LiPo battery; • The STEVAL-MKIGIBV4 ST-LINK adapter with programming cable; • The STEVAL-C34DIL24 adapter board for DIL24 sensors with the STEVAL-FLTCB01 flexible cable. STEVAL-STWBXCS1 Plastic Box...
  • Page 6 (STTS22H) sensors • Optimal high frequency performance (up to 6kHz) • Exposed pad on bottom side for thermal coupling STEVAL-C34AT01 • 34-pin slave connector, compatible with STWIN.box and other ST Evaluation boards • 34-pin flex cable included • 4x fixing holes...
  • Page 7: Software Overview

    • Dedicated Python SDK, ready-to-use for integration into any data science design flow Streaming Manager • STM32 Generic Compatible with ST BLESensor app for system setup and real-time control Middleware parson AzureRTOS FFT Library • Allow to setup MLC (Machine Learning Core) or ISPU (Intelligent Sensor Processing Unit) eLooM Framework •...
  • Page 8 DATALOG2 demonstration Optimized STM32 FW Supports streaming of all Sensors at Full data rate Device configuration (Device Template/PnPL) Raw Data streaming PnPL Sensors Card JSON config file Card Sensor Python SDK PnPL Manager Engine Real-time Plot GUI • Based on STM32U5 AzureRTOS •...
  • Page 9 DATALOG2 vs DATALOG1 • Based on AzureRTOS ecosystem • ThreadX instead of FreeRTOS • FileX instead of FatFS • USBX • Based on eLooM (Embedded Light Object Oriented framework for STM32) firmware components to enable code reusability at application level (in common to FP-AI-MONITOR1, FP-AI-MONITOR2, FP-AI-PREDMNT2, FP-AI-PDMWBSOC1) •...
  • Page 10 2- Setup & Demo Examples...
  • Page 11 HW prerequisites for STEVAL-STWINBX1 • 1 STEVAL-STWINBX1 development board • Laptop/PC with Windows 7, 8 or 10 • 1 type-C USB + 1 micro USB cables • 1 STLINK-V3MINI • 1 micro-SD card • 1 smartphone with ST BLESensor App STEVAL-STWINBX1 USB Cables...
  • Page 12 • STWIN.box programming connector is natively compatible with STLINK-V3 debuggers family (STLINK-V3SET or STLINK-V3MINI). STLINKV3 programmers are NOT included in the kit. • Alternatively, in order to offer more alternatives, an adapter to ST-Link V2-1 (STM32-Nucleo) or standard JTAG connector is included in the kit.
  • Page 13 • Download and install STM32CubeProgrammer • DATALOG2 - UltrasoundFFT • Download the FP-SNS-DATALOG2 package from www.st.com, copy the .zip file contents into a folder on your PC. The package contains binaries and source code with project files (Keil, IAR, STM32CubeIDE) based on STEVAL-STWINBX1 •...
  • Page 14 Samples demonstrations www.st.com Package structure Docs BSP, HAL Select: drivers FP-SNS-DATALOG2 Download & unpack Sample applications Visualize log of sensors data and Use the pre-compiled binaries or re-compile the code control the device customizing your device configuration...
  • Page 15 Antenna of the STWIN.box, the smartphone will read the Bluetooth pairing information and it will automatically load the ST BLESensor. In alternative, the STWIN.box can be connected to the ST BLESensor app by just open manually the application. The board presents itself as BLEDfFw. During BLE pairing, if requested, you must insert the following PIN:...
  • Page 16 Firmware Update – FFOTA To update the firmware, you can simply follow the above procedure:...
  • Page 17 Once the download is finished, the new firmware will restart automatically. To reconnect to BLESensor app (if needed), restart the app. In Board Configuration tab you can also swap between 2 firmware already loaded into the STWIN.box flash, download a new firmware or upgrade the current firmware with the latest version available from st.com.
  • Page 18 Firmware Update – ST-LINK An alternative way is to use the pre-compiled binary provided in the package in the folder Projects\STWIN.box\Applications\DATALOG2. To update the firmware: • Connect the board to the preferred programmer (here we are using STLINK-V3MINI). • Connect both the boards to a PC through the proper USB cables.
  • Page 19 Firmware Update – USB The STEVAL-STWINBX1 can also be reprogrammed via USB using the STM32CubeProgrammer "USB mode". To enter "Firmware upgrade" mode you must follow the procedure below: • Unplug the core system board. • Press the USR button. • While keeping the button pressed, connect the USB cable to the PC. •...
  • Page 20 2.1 – DATALOG2 Demonstration...
  • Page 21 2.1.1- Command Line Interface example: USB sensor data streaming...
  • Page 22 cli_example overview • The command line example is in the Utilities folder. It is available for Windows 32 and 64 bit, Linux and RaspberryPi 3 platforms. • USB_DataLog_Run.bat and USB_DataLog_Run.sh scripts provide a ready-to-use example. • If needed, the application can receive as parameters: timeout (-t), device configuration file (-f) and UCF file for Machine Learning Core or Intelligent Sensor Processing Unit (-u).
  • Page 23 Modify device and sensors configuration • To configure selected sensors, you can simply • Use one of the available device configuration examples in Utilities/STWIN.box_config_examples • Define your own sensors configuration by editing one of those examples (e.g. enable only a selected subset of sensors)
  • Page 24: Run The Application

    Run the application • Double click on the USB_DataLog_Run batch script • The application starts, and the command line appears, showing information about the connected board. • Press any key to start the datalogging • Application will stop automatically if a timeout was set •...
  • Page 25 2.1.2- HSDatalog Real Time Plot...
  • Page 26 Execute hsdatalog_GUI.py • DATALOG2 provides a Python example for real time control and plot • hsdatalog_GUI.py works within the HSDPython_SDK, developed in Python 3.10 on Windows and Linux environments. • HSDPython_SDK requires different Python modules, distributed together with FP-SNS-DATALOG2. By installing them through pip or apt- get install command, all the required dependencies are automatically solved –...
  • Page 27 hsdatalog_GUI.py • Once the connection is established, you can: • Enable/disable the needed sensors • Setup data rate, full scale, timestamps • Retrieve sensor status • Load UCF to setup an MLC (Machine Learning Core) or an ISPU (Intelligent Sensor Processing Unit) •...
  • Page 28 hsdatalog_GUI.py • Real Time Plot GUI allow also to: • send a UCF configuration file and visualize outputs • choose which tag classes will be used for the next acquisition (both HW and SW tags) • handle hardware and software data tagging and labelling of an ongoing acquisition •...
  • Page 29 hsdatalog_GUI.py • Once concluded the test, you can also check and plot the entire dataset by clicking on Plot the last acquisition button...
  • Page 30 2.1.3- DATALOG2 and BLESensor App: save data on SD card...
  • Page 31 ST BLESensor App: DATALOG2 tab • DATALOG2 application can be controlled via Bluetooth using the ST BLE Sensor app (for both Android and iOS - v4.17 and above) which lets you manage the board and sensor configurations, start/stop data acquisition on SD card and control data labelling.
  • Page 32 Configure MLC, save/load configuration • You can also: • send a UCF configuration file to setup an MLC (Machine Learning Core) or an ISPU (Intelligent Sensor Processing Unit). The UCF file could be retrieved either from the smartphone memory or from a cloud storage (e.g. Google Drive, Microsoft OneDrive, etc.) •...
  • Page 33 Acquisition settings and control • By clicking to the play button you can switch to the acquisition settings and control tab to: • start and stop an acquisition (to an SD card) • choose which tag classes will be used for the next acquisition (both HW and SW tags) •...
  • Page 34 2.1.4- DATALOG2 standalone: save data on SD card...
  • Page 35 Start an acquisition in standalone mode • DATALOG2 can work also standalone, saving all the sensor data at the highest possible rate into the SD card • DATALOG2 can also read a custom sensors configuration from the SD card root folder. To do so, you can simply save a JSON configuration file in the root folder of the SD card (same as described in 2.1.1).
  • Page 36 2.2 – HSDPython_SDK...
  • Page 37 HSDPython_SDK • FP-SNS-DATALOG2 provides a dedicated Python SDK, ready-to-use for integration into any data science design flow. • HSD_Python_SDK has been developed in Python 3.10 • The SDK contains many Python scripts, examples and Jupiter notebook that can be used to log and elaborate data and shows up the main capabilities available into the st_dtdl_gui, st_hsdatalog and st_pnpl Python modules.
  • Page 38 HSDPython_SDK • To fully exploit the SDK capabilities and solve inter- dependencies, modules shall be installed in the st_hsdatalog following order: 1. pip install st_pnpl\dist\st_pnpl-1.0.0-py3-none-any.whl HSD_GUI HSD_utils HSD_link 2. pip install st_dtdl_gui\dist\st_dtdl_gui-1.0.0-py3-none- any.whl 3. pip install st_hsdatalog\dist\GUI\st_hsdatalog-2.0.0- py3-none-any.whl st_dtdl_gui • In this way, all the required dependencies are automatically solved.
  • Page 39 HSDPython_SDK scripts • User is free to develop its own projects by including st_hsdatalog module or by modifying the already available scripts • Here the list of the available scripts: • hsdatalog_check_dummy_data.py can be used to debug the complete application and verify that data are stored or streamed correctly. You must recompile the firmware enabling HSD_USE_DUMMY_DATA define (set #define HSD_USE_DUMMY_DATA 1 into SensorManager_conf.h).
  • Page 40 HSDPython_SDK scripts • You can execute them in your preferred Python environment (i.e.: use the command python hsdatalog_plot.py) • Each scripts can accept optional parameters. You can see them by executing the example with the –h option (i.e.: python hsdatalog_ploy.py –h)
  • Page 41 2.3 – UltrasoundFFT demonstration...
  • Page 42 UltrasoundFFT on STWINKT1B • UltrasoundFFT example represents the evolution of the well-known example available for STEVAL-STWINKT1B in X- CUBE-MEMSMIC1 package. • Here an image from the original example, where the Power Spectral Density of the analog microphone were sent to this GUI...
  • Page 43 FP-SNS-DATALOG2 - UltrasoundFFT The example has been redesigned to support STEVAL-STWINBX1: → New FW: • Redesigned based on eLooM framework • SensorManager + EMData + DPU → New GUI: • Real-time FFT of Analog Microphone signal • 192kHz sampling rate, 80kHz bandwidth (ultrasound) •...
  • Page 44 FP-SNS-DATALOG2 - UltrasoundFFT ultrasound_fft_app.py is based on the same Python SDK and modules developed for hsdatalog_GUI.py. Following the same procedure described in 2.1.2, once launched the acquisition, you can: • Click on Connect button to allow the connection between the board and the PC •...
  • Page 45 3- Documents & Related Resources...
  • Page 46 • DB4865: STM32Cube function pack for STEVAL-STWINBX1 evaluation kit for high speed datalogging and ultrasound processing– databrief • UM3106: Getting started with the STM32Cube function pack for the STEVAL-STWINBX1 evaluation kit for high speed datalogging and ultrasound processing – user manual STEVAL-STWINBX1: •...
  • Page 47 4- STM32 Open Development Environment: Overview...
  • Page 48 STM32Cube software. A set of free-of-charge tools and embedded software bricks to enable fast and easy development on the STM32, including a Hardware Abstraction Layer, middleware and the STM32CubeMX PC-based configurator and code generator...
  • Page 49 Touch controller ACCESS LED drivers • Select your development environment (IAR EWARM, Keil MDK, and GCC-based IDEs) and use the free STM32Cube tools and software. ACTUATE Stepper motor driver Move DC & BLDC motor driver •...
  • Page 50 Thank you © STMicroelectronics - All rights reserved. The STMicroelectronics corporate logo is a registered trademark of the STMicroelectronics group of companies. All other names are the property of their respective owners.