1.. zephyr:board:: pandora_stm32l475
2
3Overview
4********
5
6The STM32L475 Pandora board features an ARM Cortex-M4 based STM32L475VE MCU
7with a wide range of connectivity support and configurations. Here are
8some highlights of the STM32L475 Pandora board:
9
10
11- STM32L475Vx microcontroller featuring 1 Mbyte of Flash memory, 128 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- Pushbutton (reset)
20- Four directions Joystick with selection
21- USB OTG FS with micro-AB connector
22- SAI Audio DAC, Stereo with output jack
23- Digital microphone, accelerometer, magnetometer and gyroscope MEMS
24- 128-Mbit Quad-SPI Flash memory
25- MCU current ammeter with 4 ranges and auto-calibration
26- Connector for external board or RF-EEPROM
27- Four power supply options:
28
29    - ST-LINK/V2-1
30    - USB FS connector
31    - External 5 V
32    - CR2032 battery (not provided)
33
34More information about the board can be found at the `STM32L475 Pandora website`_.
35
36Hardware
37********
38
39The STM32L475VE SoC provides the following hardware features:
40
41- Ultra-low-power with FlexPowerControl (down to 130 nA Standby mode and 100 uA/MHz run mode)
42- Core: ARM |reg| 32-bit Cortex |reg|-M4 CPU with FPU, frequency up to 80 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1)
43- Clock Sources:
44    - 4 to 48 MHz crystal oscillator
45    - 32 kHz crystal oscillator for RTC (LSE)
46    - Internal 16 MHz factory-trimmed RC ( |plusminus| 1%)
47    - Internal low-power 32 kHz RC ( |plusminus| 5%)
48    - Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by
49      LSE (better than  |plusminus| 0.25 % accuracy)
50    - 3 PLLs for system clock, USB, audio, ADC
51- RTC with HW calendar, alarms and calibration
52- 16x timers:
53    - 2x 16-bit advanced motor-control
54    - 2x 32-bit and 7x 16-bit general purpose
55    - 2x 16-bit basic
56    - 2x low-power 16-bit timers (available in Stop mode)
57    - 2x watchdogs
58    - SysTick timer
59- Up to 82 fast I/Os, most 5 V-tolerant, up to 14 I/Os with independent supply down to 1.08 V
60- Memories
61    - Up to 1 MB Flash, 2 banks read-while-write, proprietary code readout protection
62    - Up to 128 KB of SRAM including 32 KB with hardware parity check
63    - External memory interface for static memories supporting SRAM, PSRAM, NOR and NAND memories
64    - Quad SPI memory interface
65- 4x digital filters for sigma delta modulator
66- Rich analog peripherals (independent supply)
67    - 3x 12-bit ADC 5 MSPS, up to 16-bit with hardware oversampling, 200 uA/MSPS
68    - 2x 12-bit DAC, low-power sample and hold
69    - 2x operational amplifiers with built-in PGA
70    - 2x ultra-low-power comparators
71- 18x communication interfaces
72    - USB OTG 2.0 full-speed, LPM and BCD
73    - 2x SAIs (serial audio interface)
74    - 3x I2C FM+(1 Mbit/s), SMBus/PMBus
75    - 6x USARTs (ISO 7816, LIN, IrDA, modem)
76    - 3x SPIs (4x SPIs with the Quad SPI)
77    - CAN (2.0B Active) and SDMMC interface
78    - SWPMI single wire protocol master I/F
79- 14-channel DMA controller
80- True random number generator
81- CRC calculation unit, 96-bit unique ID
82- Development support: serial wire debug (SWD), JTAG, Embedded Trace Macrocell |trade|
83
84
85Supported Features
86==================
87
88The Zephyr stm32l475ve_pandora board configuration supports the following hardware features:
89
90+-----------+------------+----------------------------------------------+
91| Interface | Controller | Driver/Component                             |
92+===========+============+==============================================+
93| NVIC      | on-chip    | nested vector interrupt controller           |
94+-----------+------------+----------------------------------------------+
95| UART      | on-chip    | serial port-polling;                         |
96|           |            | serial port-interrupt                        |
97+-----------+------------+----------------------------------------------+
98| PINMUX    | on-chip    | pinmux                                       |
99+-----------+------------+----------------------------------------------+
100| GPIO      | on-chip    | gpio                                         |
101+-----------+------------+----------------------------------------------+
102| I2C       | on-chip    | I2C-AHT10(Temperature and humidity sensor)   |
103|           |            | I2C-ICM2068(light environment sensor)        |
104+-----------+------------+----------------------------------------------+
105| I2S       | on-chip    | I2S-ES8388(Audio Decoder)                    |
106+-----------+------------+----------------------------------------------+
107| USB       | on-chip    | I2S-OTG                                      |
108+-----------+------------+----------------------------------------------+
109| SDIO      | on-chip    | SDIO-AP6181(WIFI)                            |
110+-----------+------------+----------------------------------------------+
111| SPI       | on-chip    | LCD-TFT                                      |
112+-----------+------------+----------------------------------------------+
113| QSPI NOR  | on-chip    | flash                                        |
114+-----------+------------+----------------------------------------------+
115| IR-RX/TX  | on-board   | Infrared Receiver(38Khz)/Transmitter         |
116+-----------+------------+----------------------------------------------+
117| STLINK-V2 | on-board   | STLINK-V2 Debugger                           |
118+-----------+------------+----------------------------------------------+
119
120Other hardware features are not yet supported on this Zephyr port.
121
122The default configuration can be found in the defconfig file:
123
124	:zephyr_file:`boards/alientek/pandora_stm32l475/pandora_stm32l475_defconfig`
125
126
127Connections and IOs
128===================
129
130STM32L475 Pandora Board has 8 GPIO controllers. These controllers are responsible for pin muxing,
131input/output, pull-up, etc.
132
133For more details please refer to `STM32L475 Pandora board User Manual`_.
134
135Default Zephyr Peripheral Mapping:
136----------------------------------
137
138- UART_1_TX : PA9
139- UART_1_RX : PA10
140- LED_R : PE7
141- LED_G : PE8
142- LED_B : PE9
143
144System Clock
145------------
146
147STM32L475 Pandora System Clock could be driven by an internal or external oscillator,
148as well as the main PLL clock. By default the System clock is driven by the PLL clock at 80MHz,
149driven by 16MHz high speed internal oscillator.
150
151Serial Port
152-----------
153
154STM32L475 Pandora board has 6 U(S)ARTs. The Zephyr console output is assigned to UART2.
155Default settings are 115200 8N1.
156
157
158Programming and Debugging
159*************************
160
161Flashing
162========
163
164STM32L475 Pandora board includes an ST-LINK/V2-1 embedded debug tool interface.
165This interface is supported by the openocd version included in Zephyr SDK.
166
167Flashing an application to STM32L475 Pandora
168--------------------------------------------
169
170Connect the STM32L475 Pandora to your host computer using the USB
171port, then run a serial host program to connect with your Discovery
172board. For example:
173
174.. code-block:: console
175
176   $ minicom -D /dev/ttyACM0
177
178Then, build and flash in the usual way. Here is an example for the
179:zephyr:code-sample:`hello_world` application.
180
181.. zephyr-app-commands::
182   :zephyr-app: samples/hello_world
183   :board: stm32l475ve_pandora
184   :goals: build flash
185
186You should see the following message on the console:
187
188.. code-block:: console
189
190   Hello World! arm
191
192Debugging
193=========
194
195You can debug an application in the usual way.  Here is an example for the
196:zephyr:code-sample:`hello_world` application.
197
198.. zephyr-app-commands::
199   :zephyr-app: samples/hello_world
200   :board: stm32l475ve_pandora
201   :maybe-skip-config:
202   :goals: debug
203
204.. _STM32L475 Pandora website:
205   http://www.openedv.com/docs/boards/iot/zdyz_panduola.html
206
207.. _STM32L475 Pandora board User Manual:
208   http://www.openedv.com/thread-284556-1-1.html
209