boards: st: add steval_stwinbx1 support
Add board support for steval_stwinbx1 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
This commit is contained in:
parent
c8cd57fe9e
commit
83cd4d36ab
12 changed files with 907 additions and 0 deletions
3
boards/st/steval_stwinbx1/CMakeLists.txt
Normal file
3
boards/st/steval_stwinbx1/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library_sources(board.c)
|
21
boards/st/steval_stwinbx1/Kconfig.defconfig
Normal file
21
boards/st/steval_stwinbx1/Kconfig.defconfig
Normal file
|
@ -0,0 +1,21 @@
|
|||
# STEVAL_STWINBX1 Development kit board configuration
|
||||
|
||||
# Copyright (c) 2024 STMicroelectronics
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_STEVAL_STWINBX1
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
||||
if LOG
|
||||
|
||||
# Logger cannot use itself to log
|
||||
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
|
||||
default USB_CDC_ACM_LOG_LEVEL_OFF
|
||||
endchoice
|
||||
|
||||
endif # LOG
|
||||
|
||||
endif # BOARD_STEVAL_STWINBX1
|
5
boards/st/steval_stwinbx1/Kconfig.steval_stwinbx1
Normal file
5
boards/st/steval_stwinbx1/Kconfig.steval_stwinbx1
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2024 STMicroelectronics
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_STEVAL_STWINBX1
|
||||
select SOC_STM32U585XX
|
33
boards/st/steval_stwinbx1/board.c
Normal file
33
boards/st/steval_stwinbx1/board.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2024 STMicroelectronics
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/init.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include <zephyr/sys/printk.h>
|
||||
#include <zephyr/usb/usb_device.h>
|
||||
#include <zephyr/drivers/uart.h>
|
||||
|
||||
#if defined(CONFIG_CONSOLE) && defined(CONFIG_UART_CONSOLE)
|
||||
#if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart)
|
||||
/*
|
||||
* Enable console on USB CDC_ACM
|
||||
*/
|
||||
static int steval_stwinbx1_usb_console_init(void)
|
||||
{
|
||||
const struct device *const dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
|
||||
|
||||
if (!device_is_ready(dev)) {
|
||||
return -ENODEV;
|
||||
}
|
||||
return (usb_enable(NULL));
|
||||
}
|
||||
|
||||
/* needs to be done at Application */
|
||||
SYS_INIT(steval_stwinbx1_usb_console_init, APPLICATION,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
|
||||
#endif /* DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart) */
|
||||
#endif /* defined(CONFIG_CONSOLE) && defined (CONFIG_UART_CONSOLE) */
|
18
boards/st/steval_stwinbx1/board.cmake
Normal file
18
boards/st/steval_stwinbx1/board.cmake
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2024 STMicroelectronics
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# By default stm32cubeprogrammer configured to use DFU upload method.
|
||||
# Comment below line and uncomment the second line to use SWD upoad method.
|
||||
board_runner_args(stm32cubeprogrammer "--port=usb1")
|
||||
# board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
|
||||
|
||||
# Even if flash and start work, dfu-util return error 74. It can be ignored.
|
||||
board_runner_args(dfu-util "--pid=0483:df11" "--alt=0" "--dfuse")
|
||||
|
||||
board_runner_args(openocd "--tcl-port=6666")
|
||||
board_runner_args(openocd --cmd-pre-init "gdb_report_data_abort enable")
|
||||
board_runner_args(openocd "--no-halt")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/dfu-util.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
5
boards/st/steval_stwinbx1/board.yml
Normal file
5
boards/st/steval_stwinbx1/board.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
board:
|
||||
name: steval_stwinbx1
|
||||
vendor: st
|
||||
socs:
|
||||
- name: stm32u585xx
|
BIN
boards/st/steval_stwinbx1/doc/img/steval_stwinbx1.jpg
Normal file
BIN
boards/st/steval_stwinbx1/doc/img/steval_stwinbx1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
442
boards/st/steval_stwinbx1/doc/index.rst
Normal file
442
boards/st/steval_stwinbx1/doc/index.rst
Normal file
|
@ -0,0 +1,442 @@
|
|||
.. _steval_stwinbx1_board:
|
||||
|
||||
STEVAL STWINBX1 Development kit
|
||||
###############################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The STWIN.box (STEVAL-STWINBX1) is a development kit that features an Arm|reg| Cortex|reg|-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.
|
||||
|
||||
.. image:: img/steval_stwinbx1.jpg
|
||||
:align: center
|
||||
:alt: STEVAL-STWINBX1 Development kit
|
||||
|
||||
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:
|
||||
|
||||
- Multisensing wireless platform for vibration monitoring and ultrasound detection
|
||||
- Baby crying detection with Cloud AI learning
|
||||
- Barometer / environmental monitoring
|
||||
- Vehicle / goods tracking
|
||||
- Vibration monitoring
|
||||
- Compass and inclinometer
|
||||
- Sensor data logger
|
||||
|
||||
(see `Sensing`_ section for the complete lists of available
|
||||
sensors on board)
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
The STM32U585xx devices are an ultra-low-power microcontrollers family (STM32U5
|
||||
Series) based on the high-performance Arm|reg| Cortex|reg|-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 |reg| 32-bit Cortex |reg| -M33 CPU with TrustZone |reg| and FPU.
|
||||
- Performance benchmark:
|
||||
|
||||
- 1.5 DMPIS/MHz (Drystone 2.1)
|
||||
- 651 CoreMark |reg| (4.07 CoreMark |reg| /MHZ)
|
||||
|
||||
- Security and cryptography
|
||||
|
||||
- Arm |reg| TrustZone |reg| and securable I/Os memories and peripherals
|
||||
- Flexible life cycle scheme with RDP (readout protection) and password protected debug
|
||||
- Root of trust thanks to unique boot entry and secure hide protection area (HDP)
|
||||
- Secure Firmware Installation thanks to embedded Root Secure Services
|
||||
- Secure data storage with hardware unique key (HUK)
|
||||
- Secure Firmware Update support with TF-M
|
||||
- 2 AES coprocessors including one with DPA resistance
|
||||
- Public key accelerator, DPA resistant
|
||||
- On-the-fly decryption of Octo-SPI external memories
|
||||
- HASH hardware accelerator
|
||||
- Active tampers
|
||||
- True Random Number Generator NIST SP800-90B compliant
|
||||
- 96-bit unique ID
|
||||
- 512-byte One-Time Programmable for user data
|
||||
- Active tampers
|
||||
|
||||
- Clock management:
|
||||
|
||||
- 4 to 50 MHz crystal oscillator
|
||||
- 32 kHz crystal oscillator for RTC (LSE)
|
||||
- Internal 16 MHz factory-trimmed RC ( |plusminus| 1%)
|
||||
- Internal low-power 32 kHz RC ( |plusminus| 5%)
|
||||
- 2 internal multispeed 100 kHz to 48 MHz oscillators, including one auto-trimmed by
|
||||
LSE (better than |plusminus| 0.25 % accuracy)
|
||||
- 3 PLLs for system clock, USB, audio, ADC
|
||||
- Internal 48 MHz with clock recovery
|
||||
|
||||
- Power management
|
||||
|
||||
- Embedded regulator (LDO)
|
||||
- Embedded SMPS step-down converter supporting switch on-the-fly and voltage scaling
|
||||
|
||||
- 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
|
||||
|
||||
- 2x 16-bit advanced motor-control
|
||||
- 2x 32-bit and 5 x 16-bit general purpose
|
||||
- 4x low-power 16-bit timers (available in Stop mode)
|
||||
- 2x watchdogs
|
||||
- 2x SysTick timer
|
||||
|
||||
- ART accelerator
|
||||
|
||||
- 8-Kbyte instruction cache allowing 0-wait-state execution from Flash and
|
||||
external memories: up to 160 MHz, MPU, 240 DMIPS and DSP
|
||||
- 4-Kbyte data cache for external memories
|
||||
|
||||
- Memories
|
||||
|
||||
- 2-Mbyte Flash memory with ECC, 2 banks read-while-write, including 512 Kbytes with 100 kcycles
|
||||
- 786-Kbyte SRAM with ECC OFF or 722-Kbyte SRAM including up to 322-Kbyte SRAM with ECC ON
|
||||
- External memory interface supporting SRAM, PSRAM, NOR, NAND and FRAM memories
|
||||
- 2 Octo-SPI memory interfaces
|
||||
|
||||
- Rich analog peripherals (independent supply)
|
||||
|
||||
- 14-bit ADC 2.5-Msps, resolution up to 16 bits with hardware oversampling
|
||||
- 12-bit ADC 2.5-Msps, with hardware oversampling, autonomous in Stop 2 mode
|
||||
- 12-bit DAC, low-power sample and hold
|
||||
- 2 operational amplifiers with built-in PGA
|
||||
- 2 ultra-low-power comparators
|
||||
|
||||
- Up to 22 communication interfaces
|
||||
|
||||
- USB Type-C / USB power delivery controller
|
||||
- USB OTG 2.0 full-speed controller
|
||||
- 2x SAIs (serial audio interface)
|
||||
- 4x I2C FM+(1 Mbit/s), SMBus/PMBus
|
||||
- 6x USARTs (ISO 7816, LIN, IrDA, modem)
|
||||
- 3x SPIs (5x SPIs with dual OCTOSPI in SPI mode)
|
||||
- 1x FDCAN
|
||||
- 2x SDMMC interface
|
||||
- 16- and 4-channel DMA controllers, functional in Stop mode
|
||||
- 1 multi-function digital filter (6 filters)+ 1 audio digital filter with
|
||||
sound-activity detection
|
||||
|
||||
- CRC calculation unit
|
||||
- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade|
|
||||
- True Random Number Generator (RNG)
|
||||
|
||||
- Graphic features
|
||||
|
||||
- Chrom-ART Accelerator (DMA2D) for enhanced graphic content creation
|
||||
- 1 digital camera interface
|
||||
|
||||
- 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-M2SA** Bluetooth|reg| low energy v5.2 wireless technology module
|
||||
(`BlueNRG-M2 datasheet`_)
|
||||
- **MXCHIP EMW3080** (802.11 b/g/n compliant Wi-Fi module)
|
||||
- **ST25DV64K** dynamic NFC/RFID tag IC with 64-Kbit EEPROM
|
||||
(`st25dv64k datasheet`_)
|
||||
- USB Type-C|trade| connector (power supply and data)
|
||||
- STDC14 programming connector for **STLINK-V3MINI**
|
||||
(`stlink-v3mini`_)
|
||||
- microSD card socket
|
||||
|
||||
Sensing
|
||||
*******
|
||||
|
||||
- **ILPS22QS** MEMS pressure sensor
|
||||
(`ilps22qs datasheet`_)
|
||||
- **STTS22H** Digital temperature sensor
|
||||
(`stts22hh datasheet`_)
|
||||
- **TSV912** wide-bandwidth (8 MHz) rail-to-rail I/O op-amp
|
||||
(`tsv912 datasheet`_)
|
||||
- **ISM330DHCX** iNEMO IMU, 3D accelerometer and 3D gyroscope with Machine Learning Core and Finite State Machine
|
||||
(`ism330dhcx datasheet`_)
|
||||
- **IIS3DWB** wide bandwidth accelerometer
|
||||
(`iis3dwb datasheet`_)
|
||||
- **IIS2DLPC** high-performance ultra-low-power 3-axis accelerometer for industrial applications
|
||||
(`iis2dlpc datasheet`_)
|
||||
- **IIS2MDC** 3-axis magnetometer
|
||||
(`iis2mdc datasheet`_)
|
||||
- **IIS2ICLX** high-accuracy, high-resolution, low-power, 2-axis digital inclinometer with Machine Learning Core
|
||||
(`iis2iclx datasheet`_)
|
||||
- **IMP23ABSU** analog MEMS microphone
|
||||
(`imp23absu datasheet`_)
|
||||
- **IMP34DT05** digital MEMS microphone
|
||||
(`imp34dt05 datasheet`_)
|
||||
|
||||
Connections and IOs
|
||||
*******************
|
||||
|
||||
- 2x user LEDs
|
||||
|
||||
- **led0** (Green)
|
||||
- **led1** (Orange)
|
||||
|
||||
- 4x buttons/switch
|
||||
|
||||
- **User** / **boot0** button, available to user application
|
||||
but useful to let the SensorTile.box PRO enter DFU mode
|
||||
if found pressed after h/w reset (see **rst** button and
|
||||
`Programming and Debugging`_ section)
|
||||
- **RESET** button, used to reset the board
|
||||
- **PWR** button, used to Power on/off the board
|
||||
|
||||
|
||||
For more details please refer to `STEVAL-STWINBX1 board User Manual`_.
|
||||
|
||||
System Clock
|
||||
------------
|
||||
|
||||
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.
|
||||
|
||||
Serial Port
|
||||
-----------
|
||||
|
||||
The USART2 is connected to JTAG/SWD connector
|
||||
and may be used as console.
|
||||
|
||||
USB interface
|
||||
-------------
|
||||
|
||||
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.
|
||||
|
||||
Console
|
||||
-------
|
||||
|
||||
There are two possible options for Zephyr console output:
|
||||
|
||||
- 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
|
||||
|
||||
- switch the console lines from cdc_acm to uart4
|
||||
(:file:`boards/st/steval_stwinbx1/steval_stwinbx1.dts`)
|
||||
|
||||
- comment out the USB configuration macros
|
||||
(:file:`boards/st/steval_stwinbx1/steval_stwinbx1_defconfig`)
|
||||
|
||||
.. code-block:: dts
|
||||
:caption: boards/st/steval_stwinbx1/steval_stwinbx1.dts
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,console = &usart2;
|
||||
zephyr,shell-uart = &usart2;
|
||||
//zephyr,console = &cdc_acm_uart0;
|
||||
//zephyr,shell-uart = &cdc_acm_uart0;
|
||||
};
|
||||
};
|
||||
|
||||
.. code-block:: Kconfig
|
||||
:caption: boards/st/steval_stwinbx1/steval_stwinbx1_defconfig
|
||||
|
||||
# Comment out following USB config lines when
|
||||
# switching console to UART
|
||||
#CONFIG_USB_DEVICE_STACK=y
|
||||
#CONFIG_USB_DEVICE_VID=0x0483
|
||||
#CONFIG_USB_DEVICE_PID=0x5740
|
||||
#CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC STEval-STWinbx1"
|
||||
#CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
|
||||
|
||||
- through USB as USB CDC/ACM class. This is the default case present in the board dts file.
|
||||
|
||||
.. code-block:: dts
|
||||
:caption: boards/st/steval_stwinbx1/steval_stwinbx1.dts
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,console = &cdc_acm_uart0;
|
||||
};
|
||||
};
|
||||
|
||||
&zephyr_udc0 {
|
||||
cdc_acm_uart0: cdc_acm_uart0 {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
Console default settings are 115200 8N1.
|
||||
|
||||
Programming and Debugging
|
||||
-------------------------
|
||||
|
||||
There are two alternative methods of flashing ST Sensortile.box Pro board:
|
||||
|
||||
1. 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).
|
||||
|
||||
2. 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``.
|
||||
|
||||
|
||||
Install dfu-util
|
||||
----------------
|
||||
|
||||
.. 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`_
|
||||
|
||||
Install STM32CubeProgrammer
|
||||
---------------------------
|
||||
|
||||
.. note::
|
||||
Required to program over DFU (default) or SWD.
|
||||
|
||||
It is recommended to use the latest version of `STM32CubeProgrammer`_
|
||||
|
||||
|
||||
Flash an Application to STEVAL-STWINBX1
|
||||
------------------------------------------
|
||||
|
||||
There are two ways to enter DFU mode:
|
||||
|
||||
1. 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.
|
||||
|
||||
2. 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/01*512 e", serial="207136863530"
|
||||
Found DFU: [0483:df11] ver=0200, devnum=58, cfg=1, intf=0, path="3-1", alt=1, name="@Option Bytes /0x40022040/01*64 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
|
||||
.. (:ref:`sensortile_box_pro_sample_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/
|
||||
|
||||
.. _AN2606:
|
||||
http://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf
|
||||
|
||||
.. _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
|
288
boards/st/steval_stwinbx1/steval_stwinbx1.dts
Normal file
288
boards/st/steval_stwinbx1/steval_stwinbx1.dts
Normal file
|
@ -0,0 +1,288 @@
|
|||
/*
|
||||
* Copyright (c) 2024 STMicroelectronics
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <st/u5/stm32u585Xi.dtsi>
|
||||
#include <st/u5/stm32u585aiixq-pinctrl.dtsi>
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STEVAL-STWINBX1 Development kit";
|
||||
compatible = "st,steval_stwinbx1";
|
||||
|
||||
chosen {
|
||||
/*
|
||||
* By default, Zephyr console and shell are assigned to
|
||||
* USB CDC/ACM. To enable console and shell over UART,
|
||||
* uncomment the 2 following lines and set the correct
|
||||
* config in steval_stwinbx1_defconfig.
|
||||
*/
|
||||
/* zephyr,console = &usart2; */
|
||||
/* zephyr,shell-uart = &usart2; */
|
||||
/*
|
||||
* To enable console and shell over UART,
|
||||
* comment the 2 following lines
|
||||
*/
|
||||
zephyr,console = &cdc_acm_uart0;
|
||||
zephyr,shell-uart = &cdc_acm_uart0;
|
||||
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
green_led: led_1 {
|
||||
gpios = <&gpioh 12 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_1";
|
||||
};
|
||||
orange_led: led_2 {
|
||||
gpios = <&gpioh 10 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_2";
|
||||
};
|
||||
};
|
||||
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
green_pwm_led: green_pwm_led {
|
||||
pwms = <&pwm5 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
|
||||
label = "LED_1 - PWM5";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button: button {
|
||||
label = "User";
|
||||
gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>;
|
||||
zephyr,code = <INPUT_KEY_0>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &green_led;
|
||||
led1 = &orange_led;
|
||||
pwm-led0 = &green_pwm_led;
|
||||
sw0 = &user_button;
|
||||
mcuboot-led0 = &green_led;
|
||||
mcuboot-button0 = &user_button;
|
||||
watchdog0 = &iwdg;
|
||||
die-temp0 = &die_temp;
|
||||
volt-sensor0 = &vref1;
|
||||
volt-sensor1 = &vbat4;
|
||||
};
|
||||
};
|
||||
|
||||
&clk_hsi48 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&clk_hse {
|
||||
clock-frequency = <DT_FREQ_M(16)>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&clk_lse {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&clk_msis {
|
||||
status = "okay";
|
||||
msi-range = <4>;
|
||||
msi-pll-mode;
|
||||
};
|
||||
|
||||
&pll1 {
|
||||
div-m = <1>;
|
||||
mul-n = <10>;
|
||||
div-q = <2>;
|
||||
div-r = <1>;
|
||||
clocks = <&clk_hse>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pll2 {
|
||||
div-m = <2>;
|
||||
mul-n = <48>;
|
||||
div-p = <2>;
|
||||
div-q = <7>;
|
||||
div-r = <25>;
|
||||
clocks = <&clk_hse>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pll3 {
|
||||
div-m = <2>;
|
||||
mul-n = <48>;
|
||||
div-p = <2>;
|
||||
div-q = <25>;
|
||||
div-r = <2>;
|
||||
clocks = <&clk_hse>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rcc {
|
||||
clocks = <&pll1>;
|
||||
clock-frequency = <DT_FREQ_M(160)>;
|
||||
ahb-prescaler = <1>;
|
||||
apb1-prescaler = <1>;
|
||||
apb2-prescaler = <1>;
|
||||
apb3-prescaler = <1>;
|
||||
};
|
||||
|
||||
&gpioe {
|
||||
status = "okay";
|
||||
|
||||
/* Enable 2.7V Analog LDO */
|
||||
ldo-enable-gpios {
|
||||
gpio-hog;
|
||||
gpios = <15 GPIO_ACTIVE_HIGH>;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
stm32_lp_tick_source: &lptim1 {
|
||||
clocks = <&rcc STM32_CLOCK_BUS_APB3 0x00000800>,
|
||||
<&rcc STM32_SRC_LSE LPTIM1_SEL(3)>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usart2 {
|
||||
pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>;
|
||||
pinctrl-names = "default";
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
pinctrl-0 = <&i2c2_scl_ph4 &i2c2_sda_pf0>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_FAST>;
|
||||
|
||||
stts22h@3f {
|
||||
compatible = "st,stts22h";
|
||||
reg = <0x3f>;
|
||||
int-gpios = <&gpiof 5 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
&timers5 {
|
||||
st,prescaler = <10000>;
|
||||
status = "okay";
|
||||
|
||||
pwm5: pwm {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&tim5_ch3_ph12>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&aes {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&rng {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbotg_fs {
|
||||
pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
|
||||
cdc_acm_uart0: cdc_acm_uart0 {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
};
|
||||
};
|
||||
|
||||
&adc1 {
|
||||
pinctrl-0 = <&adc1_in1_pc0>;
|
||||
pinctrl-names = "default";
|
||||
st,adc-clock-source = <ASYNC>;
|
||||
st,adc-prescaler = <4>;
|
||||
vref-mv = <2750>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&adc4 {
|
||||
pinctrl-0 = <&adc4_in3_pc2>;
|
||||
pinctrl-names = "default";
|
||||
st,adc-clock-source = <ASYNC>;
|
||||
st,adc-prescaler = <4>;
|
||||
vref-mv = <2750>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&die_temp {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iwdg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vref1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vbat4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
|
||||
&sdmmc1_d2_pc10 &sdmmc1_d3_pc11
|
||||
&sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>;
|
||||
pinctrl-names = "default";
|
||||
cd-gpios = <&gpiog 1 GPIO_ACTIVE_LOW>;
|
||||
bus-width = <4>;
|
||||
clk-div = <4>;
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
/*
|
||||
* Following flash partition is dedicated to the use of steval_stwinbx1
|
||||
* with TZEN=0 (so w/o TFM).
|
||||
* Set the partitions with first MB to make use of the whole Bank1
|
||||
*/
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 DT_SIZE_K(64)>;
|
||||
};
|
||||
slot0_partition: partition@10000 {
|
||||
label = "image-0";
|
||||
reg = <0x00010000 DT_SIZE_K(416)>;
|
||||
};
|
||||
slot1_partition: partition@78000 {
|
||||
label = "image-1";
|
||||
reg = <0x00078000 DT_SIZE_K(416)>;
|
||||
};
|
||||
scratch_partition: partition@e0000 {
|
||||
label = "image-scratch";
|
||||
reg = <0x000e0000 DT_SIZE_K(64)>;
|
||||
};
|
||||
storage_partition: partition@f0000 {
|
||||
label = "storage";
|
||||
reg = <0x000f0000 DT_SIZE_K(64)>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
&gpdma1 {
|
||||
status = "okay";
|
||||
};
|
16
boards/st/steval_stwinbx1/steval_stwinbx1.yaml
Normal file
16
boards/st/steval_stwinbx1/steval_stwinbx1.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
identifier: steval_stwinbx1
|
||||
name: STEVAL STWINBX1 Development kit
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
ram: 786
|
||||
flash: 2048
|
||||
supported:
|
||||
- adc
|
||||
- counter
|
||||
- gpio
|
||||
- pwm
|
||||
- watchdog
|
||||
vendor: st
|
32
boards/st/steval_stwinbx1/steval_stwinbx1_defconfig
Normal file
32
boards/st/steval_stwinbx1/steval_stwinbx1_defconfig
Normal file
|
@ -0,0 +1,32 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable hardware stack protection
|
||||
CONFIG_HW_STACK_PROTECTION=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_GPIO_HOGS=y
|
||||
|
||||
# Enable Clocks
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
# config USB and USB console
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_LINE_CTRL=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
|
||||
# Comment out following USB config lines when
|
||||
# switching console to UART
|
||||
CONFIG_USB_DEVICE_STACK=y
|
||||
CONFIG_USB_DEVICE_VID=0x0483
|
||||
CONFIG_USB_DEVICE_PID=0x5740
|
||||
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC STEval-STWinbx1"
|
||||
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
|
||||
|
||||
# enable pin controller
|
||||
CONFIG_PINCTRL=y
|
44
boards/st/steval_stwinbx1/support/openocd.cfg
Normal file
44
boards/st/steval_stwinbx1/support/openocd.cfg
Normal file
|
@ -0,0 +1,44 @@
|
|||
source [find interface/stlink-dap.cfg]
|
||||
|
||||
set WORKAREASIZE 0x8000
|
||||
|
||||
transport select "dapdirect_swd"
|
||||
|
||||
set CHIPNAME STM32U585AIIxQ
|
||||
set BOARDNAME STEVAL-STWINBX1
|
||||
|
||||
# Enable debug when in low power modes
|
||||
set ENABLE_LOW_POWER 1
|
||||
|
||||
# Stop Watchdog counters when halt
|
||||
set STOP_WATCHDOG 1
|
||||
|
||||
# STlink Debug clock frequency
|
||||
set CLOCK_FREQ 8000
|
||||
|
||||
# Reset configuration
|
||||
# use hardware reset, connect under reset
|
||||
# connect_assert_srst needed if low power mode application running (WFI...)
|
||||
reset_config srst_only srst_nogate connect_assert_srst
|
||||
set CONNECT_UNDER_RESET 1
|
||||
set CORE_RESET 0
|
||||
|
||||
# ACCESS PORT NUMBER
|
||||
set AP_NUM 0
|
||||
# GDB PORT
|
||||
set GDB_PORT 3333
|
||||
|
||||
# BCTM CPU variables
|
||||
|
||||
source [find target/stm32u5x.cfg]
|
||||
|
||||
$_TARGETNAME configure -event gdb-attach {
|
||||
echo "Debugger attaching: halting execution"
|
||||
reset halt
|
||||
gdb_breakpoint_override hard
|
||||
}
|
||||
|
||||
$_TARGETNAME configure -event gdb-detach {
|
||||
echo "Debugger detaching: resuming execution"
|
||||
resume
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue