1.. zephyr:board:: disco_l475_iot1 2 3Overview 4******** 5 6The B-L475E-IOT01A Discovery kit for IoT node allows users to develop 7applications with direct connection to cloud servers. 8The Discovery kit enables a wide diversity of applications by exploiting 9low-power communication, multiway sensing and ARM |reg| Cortex |reg|-M4 core-based 10STM32L4 Series features. 11 12This kit provides: 13 14- 64-Mbit Quad-SPI (Macronix) Flash memory 15- Bluetooth |reg| V4.1 module (SPBTLE-RF) 16- Sub-GHz (868 or 915 MHz) low-power-programmable RF module (SPSGRF-868 or SPSGRF-915) 17- Wi-Fi |reg| module Inventek ISM43362-M3G-L44 (802.11 b/g/n compliant) 18- Dynamic NFC tag based on M24SR with its printed NFC antenna 19- 2 digital omni-directional microphones (MP34DT01) 20- Capacitive digital sensor for relative humidity and temperature (HTS221) 21- High-performance 3-axis magnetometer (LIS3MDL) 22- 3D accelerometer and 3D gyroscope (LSM6DSL) 23- 260-1260 hPa absolute digital output barometer (LPS22HB) 24- Time-of-Flight and gesture-detection sensor (VL53L0X) 25- 2 push-buttons (user and reset) 26- USB OTG FS with Micro-AB connector 27- Expansion connectors: 28 - Arduino |trade| Uno V3 29 - PMOD 30- Flexible power-supply options: 31 - ST LINK USB VBUS or external sources 32- On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration capability: 33 - mass storage, virtual COM port and debug port 34 35 36More information about the board can be found at the `Disco L475 IoT1 website`_. 37 38Hardware 39******** 40 41The STM32L475VG SoC provides the following hardware IPs: 42 43- Ultra-low-power with FlexPowerControl (down to 120 nA Standby mode and 100 uA/MHz run mode) 44- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, frequency up to 80 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1) 45- Clock Sources: 46 - 4 to 48 MHz crystal oscillator 47 - 32 kHz crystal oscillator for RTC (LSE) 48 - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%) 49 - Internal low-power 32 kHz RC ( |plusminus| 5%) 50 - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by 51 LSE (better than |plusminus| 0.25 % accuracy) 52 - 3 PLLs for system clock, USB, audio, ADC 53- RTC with HW calendar, alarms and calibration 54- Up to 24 capacitive sensing channels: support touchkey, linear and rotary touch sensors 55- 16x timers: 56 - 2x 16-bit advanced motor-control 57 - 2x 32-bit and 5x 16-bit general purpose 58 - 2x 16-bit basic 59 - 2x low-power 16-bit timers (available in Stop mode) 60 - 2x watchdogs 61 - SysTick timer 62- Up to 114 fast I/Os, most 5 V-tolerant, up to 14 I/Os with independent supply down to 1.08 V 63- Memories 64 - Up to 1 MB Flash, 2 banks read-while-write, proprietary code readout protection 65 - Up to 128 KB of SRAM including 32 KB with hardware parity check 66 - External memory interface for static memories supporting SRAM, PSRAM, NOR and NAND memories 67 - Quad SPI memory interface 68- 4x digital filters for sigma delta modulator 69- Rich analog peripherals (independent supply) 70 - 2x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 uA/MSPS 71 - 2x 12-bit DAC, low-power sample and hold 72 - 2x operational amplifiers with built-in PGA 73 - 2x ultra-low-power comparators 74- 18x communication interfaces 75 - USB OTG 2.0 full-speed, LPM and BCD 76 - 2x SAIs (serial audio interface) 77 - 3x I2C FM+(1 Mbit/s), SMBus/PMBus 78 - 6x USARTs (ISO 7816, LIN, IrDA, modem) 79 - 3x SPIs (4x SPIs with the Quad SPI) 80 - CAN (2.0B Active) and SDMMC interface 81 - SWPMI single wire protocol master I/F 82- 14-channel DMA controller 83- True random number generator 84- CRC calculation unit, 96-bit unique ID 85- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade| 86 87 88More information about STM32L475VG can be found here: 89 - `STM32L475VG on www.st.com`_ 90 - `STM32L475 reference manual`_ 91 92Supported Features 93================== 94 95.. zephyr:board-supported-hw:: 96 97Connections and IOs 98=================== 99 100Disco L475 IoT Board has 8 GPIO controllers. These controllers are responsible for pin muxing, 101input/output, pull-up, etc. 102 103Note that LED LD1 and SPI1 SCK use the same GPIO pin and cannot be used simultaneously. 104 105Available pins: 106--------------- 107 108For detailed information about available pins please refer to `STM32 Disco L475 IoT1 board User Manual`_. 109 110Default Zephyr Peripheral Mapping: 111---------------------------------- 112 113- UART_1 TX/RX : PB6/PB7 (ST-Link Virtual Port Com) 114- UART_4 TX/RX : PA0/PA1 (Arduino Serial) 115- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C) 116- I2C2 SCL/SDA : PB10/PB11 (Sensor I2C bus) 117- I2C3 SCL/SDA : PC0/PC1 118- SPI1 NSS/SCK/MISO/MOSI : PA2/PA5/PA6/PA7 (Arduino SPI) 119- SPI3 SCK/MISO/MOSI : PC10/PC11/PC12 (BT SPI bus) 120- PWM_2_CH1 : PA15 121- PWM_15_CH1 : PB14 (LD2) 122- USER_PB : PC13 123- LD1 : PA5 (same as SPI1 SCK) 124- LD2 : PB14 125- ADC12_IN5 : PA0 126- ADC123_IN3 : PC2 127- ADC123_IN4 : PC3 128- ADC12_IN13 : PC4 129- ADC12_IN14 : PC5 130- DAC1_OUT1 : PA4 131 132System Clock 133------------ 134 135Disco L475 IoT System Clock could be driven by internal or external oscillator, 136as well as main PLL clock. By default System clock is driven by PLL clock at 80MHz, 137driven by 16MHz high speed internal oscillator. 138 139Serial Port 140----------- 141 142Disco L475 IoT board has 6 U(S)ARTs. The Zephyr console output is assigned to UART1. 143Default settings are 115200 8N1. 144 145 146Programming and Debugging 147************************* 148 149Disco L475 IoT board includes an ST-LINK/V2-1 embedded debug tool interface. 150 151Applications for the ``disco_l475_iot1`` board configuration can be built and 152flashed in the usual way (see :ref:`build_an_application` and 153:ref:`application_run` for more details). 154 155Flashing 156======== 157 158The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 159so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 160 161Alternatively, OpenOCD or JLink can also be used to flash the board using 162the ``--runner`` (or ``-r``) option: 163 164.. code-block:: console 165 166 $ west flash --runner openocd 167 $ west flash --runner jlink 168 169Flashing an application to Disco L475 IoT 170----------------------------------------- 171 172Here is an example for the :zephyr:code-sample:`hello_world` application. 173 174Connect the Disco L475 IoT to your host computer using the USB port, then 175run a serial host program to connect with your Nucleo board. For example: 176 177.. code-block:: console 178 179 $ minicom -D /dev/ttyACM0 180 181Then build and flash the application: 182 183.. zephyr-app-commands:: 184 :zephyr-app: samples/hello_world 185 :board: disco_l475_iot1 186 :goals: build flash 187 188You should see the following message on the console: 189 190.. code-block:: console 191 192 $ Hello World! arm 193 194Debugging 195========= 196 197You can debug an application in the usual way. Here is an example for the 198:zephyr:code-sample:`hello_world` application. 199 200.. zephyr-app-commands:: 201 :zephyr-app: samples/hello_world 202 :board: disco_l475_iot1 203 :maybe-skip-config: 204 :goals: debug 205 206.. _Disco L475 IoT1 website: 207 https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/b-l475e-iot01a.html 208 209.. _STM32 Disco L475 IoT1 board User Manual: 210 https://www.st.com/resource/en/user_manual/dm00347848.pdf 211 212.. _STM32L475VG on www.st.com: 213 https://www.st.com/en/microcontrollers-microprocessors/stm32l475vg.html 214 215.. _STM32L475 reference manual: 216 https://www.st.com/resource/en/reference_manual/dm00083560.pdf 217 218.. _STM32CubeProgrammer: 219 https://www.st.com/en/development-tools/stm32cubeprog.html 220