boards/st/steval_stwinbx1/doc/index.rst
.. zephyr:board:: steval_stwinbx1
Overview
The STWIN.box (STEVAL-STWINBX1) is a development kit that features an Arm® Cortex®-M33 based STM32U585AI MCU and is a reference design that simplifies prototyping and testing of advanced industrial sensing applications in IoT contexts such as condition monitoring and predictive maintenance.
The STEVAL-STWINBX1 kit consists of an STWIN.box core system, a 480mAh LiPo battery, an adapter for the ST-LINK debugger, a plastic case, an adapter board for DIL 24 sensors and a flexible cable.
More information about the board can be found at the STEVAL-STWINBX1 Development kit website_.
Supported Features
The STEVAL-STWINBX1 provides motion, environmental, and audio sensor data through either the built-in RS485 transceiver, BLE, Wi-Fi, and NFC or USB protocols to a host application running on a smartphone/PC to implement applications such as:
(see Sensing_ section for the complete lists of available
sensors on board)
.. zephyr:board-supported-hw::
Hardware
The STM32U585xx devices are an ultra-low-power microcontrollers family (STM32U5 Series) based on the high-performance Arm® Cortex®-M33 32-bit RISC core. They operate at a frequency of up to 160 MHz.
Ultra-low-power with FlexPowerControl (down to 300 nA Standby mode and 19.5 uA/MHz run mode)
Core: ARM® 32-bit Cortex®-M33 CPU with TrustZone® and FPU.
Performance benchmark:
Security and cryptography
Clock management:
Power management
RTC with HW calendar and calibration
Up to 136 fast I/Os, most 5 V-tolerant, up to 14 I/Os with independent supply down to 1.08 V
Up to 24 capacitive sensing channels: support touchkey, linear and rotary touch sensors
Up to 17 timers and 2 watchdogs
ART accelerator
Memories
Rich analog peripherals (independent supply)
Up to 22 communication interfaces
CRC calculation unit
Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell™
True Random Number Generator (RNG)
Graphic features
Mathematical co-processor
CORDIC for trigonometric functions acceleration
FMAC (filter mathematical accelerator)
More information about STM32U585AI can be found here:
STM32U585 on www.st.com_STM32U585 reference manual_Connectivity
BlueNRG-M2 datasheet_)st25dv64k datasheet_)stlink-v3mini_)Sensing
ilps22qs datasheet_)stts22hh datasheet_)tsv912 datasheet_)ism330dhcx datasheet_)iis3dwb datasheet_)iis2dlpc datasheet_)iis2mdc datasheet_)iis2iclx datasheet_)imp23absu datasheet_)imp34dt05 datasheet_)Connections and IOs
2x user LEDs
4x buttons/switch
Programming and Debugging_ section)For more details please refer to STEVAL-STWINBX1 board User Manual_.
STEVAL-STWINBX1 System Clock could be driven by an internal or external oscillator, as well as the main PLL clock. By default the System clock is driven by the PLL clock at 160MHz, driven by 16MHz high speed external oscillator. The internal AHB/APB1/APB2/APB3 AMBA buses are all clocked at 160MHz.
The USART2 is connected to JTAG/SWD connector and may be used as console.
STEVAL-STWINBX1 can be connected as a USB device to a PC host through its USB-C connector. The final application may use it to declare STEVAL-STWINBX1 device as belonging to a certain standard or vendor class, e.g. a CDC, a mass storage or a composite device with both functions.
There are two possible options for Zephyr console output:
through common CDC ACM UART backend configuration for all boards
through USART2 which is available on SWD connector (CN4). In this case a JTAG adapter can be used to connect STEVAL-STWINBX1 and have both SWD and console lines available.
To enable console and shell over UART:
in your prj.conf, override the board's default configuration by setting :code:CONFIG_BOARD_SERIAL_BACKEND_CDC_ACM=n
add an overlay file named <board>.overlay:
.. code-block:: dts
/ { chosen { zephyr,console = &usart2; zephyr,shell-uart = &usart2; }; };
Console default settings are 115200 8N1.
Programming and Debugging
.. zephyr:board-supported-runners::
There are two alternative methods of flashing ST Sensortile.box Pro board:
Using DFU software tools
This method requires to enter STM32U585 ROM bootloader DFU mode
by powering up (or reset) the board while keeping the USER (BOOT0) button pressed.
No additional hardware is required except a USB-C cable. This method is fully
supported by :ref:flash-debug-host-tools.
You can read more about how to enable and use the ROM bootloader by checking
the application note AN2606_ (STM32U585xx section).
Using SWD hardware tools
The STEVAL-STWINBX1 does not include a on-board debug probe.
It requires to connect additional hardware, like a ST-LINK/V3
embedded debug tool, to the board STDC14 connector (CN4) labeled MCU-/SWD.
.. note:: Required only to use dfu-util runner.
It is recommended to use at least v0.9 of dfu-util. The package available in
Debian and Ubuntu can be quite old, so you might have to build dfu-util from source.
Information about how to get the source code and how to build it can be found
at the DFU-UTIL website_
.. note:: Required to program over DFU (default) or SWD.
It is recommended to use the latest version of STM32CubeProgrammer_
There are two ways to enter DFU mode:
USB-C cable not connected
While pressing the USER button, connect the USB-C cable to the USB OTG STEVAL-STWINBX1 port and to your computer.
USB-C cable connected
While pressing the USER button, press the RESET button and release it.
With both methods, the board should be forced to enter DFU mode.
Check that the board is indeed in DFU mode:
.. code-block:: console
$ sudo dfu-util -l dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2019 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Found DFU: [0483:df11] ver=0200, devnum=58, cfg=1, intf=0, path="3-1", alt=2, name="@OTP Memory /0x0BFA0000/01512 e", serial="207136863530" Found DFU: [0483:df11] ver=0200, devnum=58, cfg=1, intf=0, path="3-1", alt=1, name="@Option Bytes /0x40022040/0164 e", serial="207136863530" Found DFU: [0483:df11] ver=0200, devnum=58, cfg=1, intf=0, path="3-1", alt=0, name="@Internal Flash /0x08000000/256*08Kg", serial="207136863530"
You should see the following confirmation on your Linux host:
.. code-block:: console
$ dmesg usb 3-1: new full-speed USB device number 16 using xhci_hcd usb 3-1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00 usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 3-1: Product: DFU in FS Mode usb 3-1: Manufacturer: STMicroelectronics usb 3-1: SerialNumber: 207136863530
You can build and flash the provided sample application
(:zephyr:code-sample:stwinbx1_sensors) that reads sensors data and outputs
values on the console.
.. _STEVAL-STWINBX1 Development kit website: https://www.st.com/en/evaluation-tools/steval-stwinbx1.html
.. _STEVAL-STWINBX1 board User Manual: https://www.st.com/resource/en/user_manual/um2965-getting-started-with-the-stevalstwinbx1-sensortile-wireless-industrial-node-development-kit-stmicroelectronics.pdf
.. _STM32U585 on www.st.com: https://www.st.com/en/microcontrollers-microprocessors/stm32u575-585.html
.. _STM32U585 reference manual: https://www.st.com/resource/en/reference_manual/rm0456-stm32u575585-armbased-32bit-mcus-stmicroelectronics.pdf
.. _STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html
.. _DFU-UTIL website: http://dfu-util.sourceforge.net/
.. _BlueNRG-M2 datasheet: https://www.st.com/en/product/BlueNRG-M2
.. _st25dv64k datasheet: https://www.st.com/en/nfc/st25dv64k.html
.. _stlink-v3mini: https://www.st.com/en/development-tools/stlink-v3mini.html
.. _ilps22qs datasheet: https://www.st.com/en/mems-and-sensors/ilps22qs.html
.. _stts22hh datasheet: https://www.st.com/en/mems-and-sensors/stts22h.html
.. _tsv912 datasheet: https://www.st.com/en/automotive-analog-and-power/tsv912.html
.. _ism330dhcx datasheet: https://www.st.com/en/mems-and-sensors/ism330dhcx.html
.. _iis3dwb datasheet: https://www.st.com/en/mems-and-sensors/iis3dwb.html
.. _iis2dlpc datasheet: https://www.st.com/en/mems-and-sensors/iis2dlpc.html
.. _iis2mdc datasheet: https://www.st.com/en/mems-and-sensors/iis2mdc.html
.. _iis2iclx datasheet: https://www.st.com/en/mems-and-sensors/iis2iclx.html
.. _imp23absu datasheet: https://www.st.com/en/mems-and-sensors/imp23absu.html
.. _imp34dt05 datasheet: https://www.st.com/en/mems-and-sensors/imp34dt05.html