|
| 1 | +.. _stm32l476g_disco_board: |
| 2 | + |
| 3 | +ST STM32L476G Discovery |
| 4 | +######################## |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The STM32L476G Discovery board features an ARM Cortex-M4 based STM32L476VG MCU |
| 10 | +with a wide range of connectivity support and configurations. Here are |
| 11 | +some highlights of the STM32L476G Discovery board: |
| 12 | + |
| 13 | + |
| 14 | +- STM32L476VGT6 microcontroller featuring 1 Mbyte of Flash memory, 128 Kbytes of RAM in LQFP100 package |
| 15 | +- On-board ST-LINK/V2-1 supporting USB re-enumeration capability |
| 16 | +- Three different interfaces supported on USB: |
| 17 | + |
| 18 | + - Virtual com port |
| 19 | + - Mass storage |
| 20 | + - Debug port |
| 21 | + |
| 22 | +- LCD 24 segments, 4 commons in DIP 28 package |
| 23 | +- Seven LEDs: |
| 24 | + |
| 25 | + - LD1 (red/green) for USB communication |
| 26 | + - LD2 (red) for 3.3 V power on |
| 27 | + - LD3 Over current (red) |
| 28 | + - LD4 (red), LD5 (green) two user LEDs |
| 29 | + - LD6 (green), LD7 (red) USB OTG FS LEDs |
| 30 | + |
| 31 | +- Pushbutton (reset) |
| 32 | +- Four directions Joystick with selection |
| 33 | +- USB OTG FS with micro-AB connector |
| 34 | +- SAI Audio DAC, Stereo with output jack |
| 35 | +- Digital microphone, accelerometer, magnetometer and gyroscope MEMS |
| 36 | +- 128-Mbit Quad-SPI Flash memory |
| 37 | +- MCU current ammeter with 4 ranges and auto-calibration |
| 38 | +- Connector for external board or RF-EEPROM |
| 39 | +- Four power supply options: |
| 40 | + - ST-LINK/V2-1 |
| 41 | + - USB FS connector |
| 42 | + - External 5 V |
| 43 | + - CR2032 battery (not provided) |
| 44 | + |
| 45 | +.. image:: img/en.stm32l476g-disco.jpg |
| 46 | + :width: 450px |
| 47 | + :align: center |
| 48 | + :height: 394px |
| 49 | + :alt: STM32L476G Discovery |
| 50 | + |
| 51 | +More information about the board can be found at the `STM32L476G Discovery website`_. |
| 52 | + |
| 53 | +Hardware |
| 54 | +******** |
| 55 | + |
| 56 | +The STM32L476VG SoC provides the following hardware features: |
| 57 | + |
| 58 | +- Ultra-low-power with FlexPowerControl (down to 130 nA Standby mode and 100 uA/MHz run mode) |
| 59 | +- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, frequency up to 80 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1) |
| 60 | +- Clock Sources: |
| 61 | + - 4 to 48 MHz crystal oscillator |
| 62 | + - 32 kHz crystal oscillator for RTC (LSE) |
| 63 | + - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%) |
| 64 | + - Internal low-power 32 kHz RC ( |plusminus| 5%) |
| 65 | + - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by |
| 66 | + LSE (better than |plusminus| 0.25 % accuracy) |
| 67 | + - 3 PLLs for system clock, USB, audio, ADC |
| 68 | +- RTC with HW calendar, alarms and calibration |
| 69 | +- LCD 8 x 40 or 4 x 44 with step-up converter |
| 70 | +- Up to 24 capacitive sensing channels: support touchkey, linear and rotary touch sensors |
| 71 | +- 16x timers: |
| 72 | + - 2x 16-bit advanced motor-control |
| 73 | + - 2x 32-bit and 5x 16-bit general purpose |
| 74 | + - 2x 16-bit basic |
| 75 | + - 2x low-power 16-bit timers (available in Stop mode) |
| 76 | + - 2x watchdogs |
| 77 | + - SysTick timer |
| 78 | +- Up to 114 fast I/Os, most 5 V-tolerant, up to 14 I/Os with independent supply down to 1.08 V |
| 79 | +- Memories |
| 80 | + - Up to 1 MB Flash, 2 banks read-while-write, proprietary code readout protection |
| 81 | + - Up to 128 KB of SRAM including 32 KB with hardware parity check |
| 82 | + - External memory interface for static memories supporting SRAM, PSRAM, NOR and NAND memories |
| 83 | + - Quad SPI memory interface |
| 84 | +- 4x digital filters for sigma delta modulator |
| 85 | +- Rich analog peripherals (independent supply) |
| 86 | + - 3x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 uA/MSPS |
| 87 | + - 2x 12-bit DAC, low-power sample and hold |
| 88 | + - 2x operational amplifiers with built-in PGA |
| 89 | + - 2x ultra-low-power comparators |
| 90 | +- 18x communication interfaces |
| 91 | + - USB OTG 2.0 full-speed, LPM and BCD |
| 92 | + - 2x SAIs (serial audio interface) |
| 93 | + - 3x I2C FM+(1 Mbit/s), SMBus/PMBus |
| 94 | + - 6x USARTs (ISO 7816, LIN, IrDA, modem) |
| 95 | + - 3x SPIs (4x SPIs with the Quad SPI) |
| 96 | + - CAN (2.0B Active) and SDMMC interface |
| 97 | + - SWPMI single wire protocol master I/F |
| 98 | +- 14-channel DMA controller |
| 99 | +- True random number generator |
| 100 | +- CRC calculation unit, 96-bit unique ID |
| 101 | +- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade| |
| 102 | + |
| 103 | + |
| 104 | +More information about STM32L476VG can be found here: |
| 105 | + - `STM32L476VG on www.st.com`_ |
| 106 | + - `STM32L476 reference manual`_ |
| 107 | + |
| 108 | + |
| 109 | +Supported Features |
| 110 | +================== |
| 111 | + |
| 112 | +The Zephyr stm32l476g_disco board configuration supports the following hardware features: |
| 113 | + |
| 114 | ++-----------+------------+-------------------------------------+ |
| 115 | +| Interface | Controller | Driver/Component | |
| 116 | ++===========+============+=====================================+ |
| 117 | +| NVIC | on-chip | nested vector interrupt controller | |
| 118 | ++-----------+------------+-------------------------------------+ |
| 119 | +| UART | on-chip | serial port-polling; | |
| 120 | +| | | serial port-interrupt | |
| 121 | ++-----------+------------+-------------------------------------+ |
| 122 | +| PINMUX | on-chip | pinmux | |
| 123 | ++-----------+------------+-------------------------------------+ |
| 124 | +| GPIO | on-chip | gpio | |
| 125 | ++-----------+------------+-------------------------------------+ |
| 126 | + |
| 127 | +Other hardware features are not yet supported on this Zephyr port. |
| 128 | + |
| 129 | +The default configuration can be found in the defconfig file: |
| 130 | + |
| 131 | + ``boards/arm/stm32l476g_disco/stm32l476g_disco_defconfig`` |
| 132 | + |
| 133 | + |
| 134 | +Connections and IOs |
| 135 | +=================== |
| 136 | + |
| 137 | +STM32L476G Discovery Board has 8 GPIO controllers. These controllers are responsible for pin muxing, |
| 138 | +input/output, pull-up, etc. |
| 139 | + |
| 140 | +For mode details please refer to `STM32L476G Discovery board User Manual`_. |
| 141 | + |
| 142 | +Default Zephyr Peripheral Mapping: |
| 143 | +---------------------------------- |
| 144 | + |
| 145 | +- UART_2_TX : PD5 |
| 146 | +- UART_2_RX : PD6 |
| 147 | +- LD4 : PB2 |
| 148 | +- LD5 : PE8 |
| 149 | + |
| 150 | +System Clock |
| 151 | +------------ |
| 152 | + |
| 153 | +STM32L476G Discovery System Clock could be driven by an internal or external oscillator, |
| 154 | +as well as the main PLL clock. By default the System clock is driven by the PLL clock at 80MHz, |
| 155 | +driven by 16MHz high speed internal oscillator. |
| 156 | + |
| 157 | +Serial Port |
| 158 | +----------- |
| 159 | + |
| 160 | +STM32L476G Discovery board has 6 U(S)ARTs. The Zephyr console output is assigned to UART2. |
| 161 | +Default settings are 115200 8N1. |
| 162 | + |
| 163 | + |
| 164 | +Programming and Debugging |
| 165 | +************************* |
| 166 | + |
| 167 | +Flashing |
| 168 | +======== |
| 169 | + |
| 170 | +STM32L476G Discovery board includes an ST-LINK/V2-1 embedded debug tool interface. |
| 171 | +This interface is supported by the openocd version included in Zephyr SDK. |
| 172 | + |
| 173 | +Flashing an application to STM32L476G Discovery |
| 174 | +----------------------------------------------- |
| 175 | + |
| 176 | +Connect the STM32L476G Discovery to your host computer using the USB |
| 177 | +port, then run a serial host program to connect with your Discovery |
| 178 | +board. For example: |
| 179 | + |
| 180 | +.. code-block:: console |
| 181 | +
|
| 182 | + $ minicom -D /dev/ttyACM0 |
| 183 | +
|
| 184 | +Then, build and flash in the usual way. Here is an example for the |
| 185 | +:ref:`hello_world` application. |
| 186 | + |
| 187 | +.. zephyr-app-commands:: |
| 188 | + :zephyr-app: samples/hello_world |
| 189 | + :board: stm32l476g_disco |
| 190 | + :goals: build flash |
| 191 | + |
| 192 | +You should see the following message on the console: |
| 193 | + |
| 194 | +.. code-block:: console |
| 195 | +
|
| 196 | + Hello World! arm |
| 197 | +
|
| 198 | +Debugging |
| 199 | +========= |
| 200 | + |
| 201 | +You can debug an application in the usual way. Here is an example for the |
| 202 | +:ref:`hello_world` application. |
| 203 | + |
| 204 | +.. zephyr-app-commands:: |
| 205 | + :zephyr-app: samples/hello_world |
| 206 | + :board: stm32l476g_disco |
| 207 | + :maybe-skip-config: |
| 208 | + :goals: debug |
| 209 | + |
| 210 | +.. _STM32L476G Discovery website: |
| 211 | + http://www.st.com/en/evaluation-tools/32l476gdiscovery.html |
| 212 | + |
| 213 | +.. _STM32L476G Discovery board User Manual: |
| 214 | + http://www.st.com/resource/en/user_manual/dm00172179.pdf |
| 215 | + |
| 216 | +.. _STM32L476VG on www.st.com: |
| 217 | + http://www.st.com/en/microcontrollers/stm32l476vg.html |
| 218 | + |
| 219 | +.. _STM32L476 reference manual: |
| 220 | + http://www.st.com/resource/en/reference_manual/DM00083560.pdf |
0 commit comments