1.. zephyr:board:: b_l4s5i_iot01a 2 3Overview 4******** 5 6The B_L4S5I_IOT01A Discovery kit features an ARM Cortex-M4 based STM32L4S5VI MCU 7with a wide range of connectivity support and configurations. Here are 8some highlights of the B_L4S5I_IOT01A Discovery kit: 9 10 11- STM32L4S5VIT6 microcontroller featuring 2 Mbyte of Flash memory, 640 Kbytes of RAM in LQFP100 package 12- On-board ST-LINK/V2-1 supporting USB re-enumeration capability 13- Three different interfaces supported on USB: 14 15 - Virtual com port 16 - Mass storage 17 - Debug port 18 19- ARDUINO ® Uno V3 and Pmod TM expansion connector 20- 4 LEDs (2 for user, wifi, BLE) 21- 2 push-buttons (user and reset) 22- USB OTG FS with micro-AB connector 23- Dynamic NFC tag 24- 2 digital omnidirectional microphones 25- Capacitive digital sensor for relative humidity and temperature 26- Time-of-flight and gesture-detection sensors 27- High-performance 3-axis magnetometer 28- 3D accelerometer and 3D gyroscope 29- 64-Mbit Quad-SPI Flash memory 30- Bluetooth ® 4.1 module 31- 802.11 b/g/n compliant Wi‐Fi ® module 32- MCU current ammeter with 4 ranges and auto-calibration 33 34- Flexible power supply options: 35 - ST-LINK/V2-1 36 - USB FS connector 37 - External 5 V 38 39 40More information about the board can be found at the `B L4S5I IOT01A Discovery kit website`_. 41 42Hardware 43******** 44 45The STM32L4S5VI SoC provides the following hardware features: 46 47- Ultra-low-power with FlexPowerControl (down to 130 nA Standby mode and 100 uA/MHz run mode) 48- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, frequency up to 120 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1) 49- Clock Sources: 50 - 4 to 48 MHz crystal oscillator 51 - 32 kHz crystal oscillator for RTC (LSE) 52 - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%) 53 - Internal low-power 32 kHz RC ( |plusminus| 5%) 54 - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by 55 LSE (better than |plusminus| 0.25 % accuracy) 56 - 3 PLLs for system clock, USB, audio, ADC 57- RTC with HW calendar, alarms and calibration 58- Up to 21 capacitive sensing channels: support touchkey, linear and rotary touch sensors 59- 16x timers: 60 - 2x 16-bit advanced control 61 - 2x 32-bit and 5x 16-bit general purpose 62 - 2x 16-bit basic 63 - 2x low-power 16-bit timers (available in Stop mode) 64 - 2x watchdogs 65 - SysTick timer 66- Up to 83 fast I/Os, most 5 V-tolerant 67- Memories 68 - Up to 2 MB Flash, 2 banks read-while-write, proprietary code readout protection 69 - Up to 640 KB of SRAM including 32 KB with hardware parity check 70 - External memory interface for static memories supporting SRAM, PSRAM, NOR and NAND memories 71 - Octo SPI memory interface 72- 4x digital filters for sigma delta modulator 73- Rich analog peripherals (independent supply) 74 - 1x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 uA/MSPS 75 - 2x 12-bit DAC, low-power sample and hold 76 - 2x operational amplifiers with built-in PGA 77 - 2x ultra-low-power comparators 78- 18x communication interfaces 79 - USB OTG 2.0 full-speed, LPM and BCD 80 - 2x SAIs (serial audio interface) 81 - 4x I2C FM+(1 Mbit/s), SMBus/PMBus 82 - 6x USARTs (ISO 7816, LIN, IrDA, modem) 83 - 3x SPIs (4x SPIs with the Quad SPI) 84 - CAN (2.0B Active) and SDMMC interface 85 - SDMMC I/F 86 - DCMI camera interface 87- 14-channel DMA controller with multiplex request router 88- True random number generator 89- CRC calculation unit, 96-bit unique ID 90- AES and HASH hardware accelerators 91- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade| 92 93 94More information about STM32L4S5VI can be found here: 95 - `STM32L4S5VI on www.st.com`_ 96 - `STM32L4S5 reference manual`_ 97 98 99Supported Features 100================== 101 102The Zephyr b_l4s5i_iot01a board configuration supports the following hardware features: 103 104+-----------+------------+-------------------------------------+ 105| Interface | Controller | Driver/Component | 106+===========+============+=====================================+ 107| NVIC | on-chip | nested vector interrupt controller | 108+-----------+------------+-------------------------------------+ 109| UART | on-chip | serial port-polling; | 110| | | serial port-interrupt | 111+-----------+------------+-------------------------------------+ 112| PINMUX | on-chip | pinmux | 113+-----------+------------+-------------------------------------+ 114| GPIO | on-chip | gpio | 115+-----------+------------+-------------------------------------+ 116| I2C | on-chip | i2c | 117+-----------+------------+-------------------------------------+ 118| SPI | on-chip | spi | 119+-----------+------------+-------------------------------------+ 120| PWM | on-chip | pwm | 121+-----------+------------+-------------------------------------+ 122| WATCHDOG | on-chip | independent watchdog | 123+-----------+------------+-------------------------------------+ 124| BLE | module | bluetooth | 125+-----------+------------+-------------------------------------+ 126| WIFI | module | es-wifi | 127+-----------+------------+-------------------------------------+ 128 129The default configuration can be found in the defconfig file: 130 131 :zephyr_file:`boards/st/b_l4s5i_iot01a/b_l4s5i_iot01a_defconfig` 132 133 134Connections and IOs 135=================== 136 137B_L4S5I_IOT01A Discovery kit has 9 GPIO controllers (from A to I). These controllers are responsible for pin muxing, 138input/output, pull-up, etc. 139 140For more details please refer to `B L47S5I IOT01A board User Manual`_. 141 142Default Zephyr Peripheral Mapping: 143---------------------------------- 144 145- UART_1 TX/RX : PB6/PB7 (ST-Link Virtual Port Com) 146- UART_4 TX/RX : PA0/PA1 (Arduino Serial) 147- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) 148- I2C2 SCL/SDA : PB10/PB11 (Sensor I2C bus) 149- SPI1 NSS/SCK/MISO/MOSI : PA2/PA5/PA6/PA7 (Arduino SPI) 150- SPI3 SCK/MISO/MOSI : PC10/PC11/PC12 (BT SPI bus) 151- PWM_2_CH1 : PA15 152- LD1 : PA5 153- LD2 : PB14 154- user button : PC13 155 156System Clock 157------------ 158 159B_L4S5I_IOT01A Discovery System Clock could be driven by an internal or external oscillator, 160as well as the main PLL clock. By default the System clock is driven by the PLL clock at 80MHz, 161driven by 16MHz high speed internal oscillator. 162 163Serial Port 164----------- 165 166B_L4S5I_IOT01A Discovery kit has 4 U(S)ARTs. The Zephyr console output is assigned to UART1. 167Default settings are 115200 8N1. 168 169 170Programming and Debugging 171************************* 172 173B_L4S5I_IOT01A Discovery kit includes an ST-LINK/V2-1 embedded debug tool interface. 174 175Flashing 176======== 177 178The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 179so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 180 181Alternatively, OpenOCD or JLink can also be used to flash the board using 182the ``--runner`` (or ``-r``) option: 183 184.. code-block:: console 185 186 $ west flash --runner openocd 187 $ west flash --runner jlink 188 189Flashing an application to B_L4S5I_IOT01A Discovery kit 190------------------------------------------------------- 191 192Connect the B_L4S5I_IOT01A Discovery kit to your host computer using the USB 193port, then run a serial host program to connect with your Discovery 194board. For example: 195 196.. code-block:: console 197 198 $ minicom -D /dev/ttyACM0 199 200Then, build and flash in the usual way. Here is an example for the 201:zephyr:code-sample:`hello_world` application. 202 203.. zephyr-app-commands:: 204 :zephyr-app: samples/hello_world 205 :board: b_l4s5i_iot01a 206 :goals: build flash 207 208You should see the following message on the console: 209 210.. code-block:: console 211 212 Hello World! arm 213 214Debugging 215========= 216 217You can debug an application in the usual way. Here is an example for the 218:zephyr:code-sample:`hello_world` application. 219 220.. zephyr-app-commands:: 221 :zephyr-app: samples/hello_world 222 :board: b_l4s5i_iot01a 223 :maybe-skip-config: 224 :goals: debug 225 226.. _B L4S5I IOT01A Discovery kit website: 227 https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html 228 229.. _B L47S5I IOT01A board User Manual: 230 https://www.st.com/resource/en/user_manual/dm00698410.pdf 231 232.. _STM32L4S5VI on www.st.com: 233 https://www.st.com/en/microcontrollers-microprocessors/stm32l4s5vi.html 234 235.. _STM32L4S5 reference manual: 236 https://www.st.com/resource/en/reference_manual/dm00310109.pdf 237 238.. _STM32CubeProgrammer: 239 https://www.st.com/en/development-tools/stm32cubeprog.html 240