1.. _stm32f746g_disco_board:
2
3ST STM32F746G Discovery
4#######################
5
6Overview
7********
8
9The discovery kit enables a wide diversity of applications taking benefit
10from audio, multi-sensor support, graphics, security, security, video,
11and high-speed connectivity features. Important board features include:
12
13- STM32F746NGH6 microcontroller featuring 1 Mbytes of Flash memory and 340 Kbytes of RAM, in BGA216 package
14- On-board ST-LINK/V2-1 supporting USB re-enumeration capability
15- Five power supply options:
16
17  - ST LINK/V2-1
18  - USB FS connector
19  - USB HS connector
20  - VIN from Arduino connector
21  - External 5 V from connector
22
23- Two pushbuttons (user and reset)
24- USB functions: virtual COM port, mass storage, debug port
25- 4.3-inch 480x272 color LCD-TFT with capacitive touch screen
26- SAI audio codec
27- Audio line in and line out jack
28- Stereo speaker outputs
29- Two ST MEMS microphones
30- SPDIF RCA input connector
31- 128-Mbit Quad-SPI Flash memory
32- 128-Mbit SDRAM (64 Mbits accessible)
33- Connector for microSD card
34- USB OTG HS with Micro-AB connectors
35- USB OTG FS with Micro-AB connectors
36- Ethernet connector compliant with IEEE-802.3-2002
37
38.. image:: img/stm32f746g_disco.jpg
39     :align: center
40     :alt: STM32F746G-DISCO
41
42More information about the board can be found at the `32F746G-DISCO website`_.
43
44Hardware
45********
46
47The STM32F746G Discovery kit provides the following hardware components:
48
49- STM32F746NGH6 in BGA216 package
50- ARM |reg| 32-bit Cortex |reg| -M7 CPU with FPU
51- 216 MHz max CPU frequency
52- VDD from 1.8 V to 3.6 V
53- 2 MB Flash
54- 384+4 KB SRAM including 64-Kbyte of core coupled memory
55- GPIO with external interrupt capability
56- LCD parallel interface, 8080/6800 modes
57- LCD TFT controller supporting up to XGA resolution
58- MIPI |reg|  DSI host controller supporting up to 720p 30Hz resolution
59- 3x12-bit ADC with 24 channels
60- 2x12-bit D/A converters
61- RTC
62- Advanced-control Timer
63- General Purpose Timers (17)
64- Watchdog Timers (2)
65- USART/UART (8)
66- I2C (3)
67- SPI (6)
68- 1xSAI (serial audio interface)
69- SDIO
70- 2xCAN
71- USB 2.0 OTG FS with on-chip PHY
72- USB 2.0 OTG HS/FS with dedicated DMA, on-chip full-speed PHY and ULPI
73- 10/100 Ethernet MAC with dedicated DMA
74- 8- to 14-bit parallel camera
75- CRC calculation unit
76- True random number generator
77- DMA Controller
78
79More information about STM32F746NGH6 can be found here:
80
81- `STM32F746NGH6 on www.st.com`_
82- `STM32F74xxx reference manual`_
83
84Supported Features
85==================
86
87The Zephyr stm32f746g_disco board configuration supports the following hardware features:
88
89+-----------+------------+-------------------------------------+
90| Interface | Controller | Driver/Component                    |
91+===========+============+=====================================+
92| NVIC      | on-chip    | nested vector interrupt controller  |
93+-----------+------------+-------------------------------------+
94| UART      | on-chip    | serial port-polling;                |
95|           |            | serial port-interrupt               |
96+-----------+------------+-------------------------------------+
97| PINMUX    | on-chip    | pinmux                              |
98+-----------+------------+-------------------------------------+
99| GPIO      | on-chip    | gpio                                |
100+-----------+------------+-------------------------------------+
101| FLASH     | on-chip    | flash memory                        |
102+-----------+------------+-------------------------------------+
103| ETHERNET  | on-chip    | Ethernet                            |
104+-----------+------------+-------------------------------------+
105| PWM       | on-chip    | pwm                                 |
106+-----------+------------+-------------------------------------+
107| I2C       | on-chip    | i2c                                 |
108+-----------+------------+-------------------------------------+
109| USB       | on-chip    | usb                                 |
110+-----------+------------+-------------------------------------+
111| SDMMC     | on-chip    | disk access                         |
112+-----------+------------+-------------------------------------+
113| SPI       | on-chip    | spi                                 |
114+-----------+------------+-------------------------------------+
115| QSPI NOR  | on-chip    | off-chip flash                      |
116+-----------+------------+-------------------------------------+
117| FMC       | on-chip    | memc (SDRAM)                        |
118+-----------+------------+-------------------------------------+
119| LTDC      | on-chip    | display                             |
120+-----------+------------+-------------------------------------+
121
122Other hardware features are not yet supported on Zephyr porting.
123
124The default configuration can be found in the defconfig file:
125``boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig``
126
127Pin Mapping
128===========
129
130STM32F746G Discovery kit has 9 GPIO controllers. These controllers are responsible for pin muxing,
131input/output, pull-up, etc.
132
133For mode details please refer to `32F746G-DISCO board User Manual`_.
134
135Default Zephyr Peripheral Mapping:
136----------------------------------
137
138The STM32F746G Discovery kit features an Arduino Uno V3 connector. Board is
139configured as follows
140
141- UART_1 TX/RX : PA9/PB7 (ST-Link Virtual Port Com)
142- UART_6 TX/RX : PC6/PC7 (Arduino Serial)
143- I2C1 SCL/SDA : PB8/PB9 (Arduino I2C)
144- SDMMC_1 D0/D1/D2/D3/CK/CD/CMD: PC8/PC9/PC10/PC11/PC12/PC13/PD2
145- SPI2 NSS/SCK/MISO/MOSI : PA8/PI1/PB14/PB15 (Arduino SPI)
146- PWM_3_CH1 : PB4
147- ETH : PA1, PA2, PA7, PC1, PC4, PC5, PG11, PG13, PG14
148- USER_PB : PI11
149- LD1 : PI1
150- USB DM : PA11
151- USB DP : PA12
152- FMC SDRAM :
153
154   - D0-D15 : PD14/PD15/PD0/PD1/PE7/PE8/PE9/PE10/PE11/PE12/PE13/PE14/PE15/PD8/PD9/PD10
155   - A0-A11 : PF0/PF1/PF2/PF3/PF4/PF5/PF12/PF13/PF14/PF15/PG0/PG1
156   - A14/A15 : PG4/PG5
157   - SDNRAS/SDNCAS : PF11/PG15
158   - NBL0/NBL1 : PE0/PE1
159   - SDCLK/SDNWE/SDCKE0/SDNE0 : PG8/PH5/PC3/PH3
160
161- LTDC :
162
163   - R0-R7 : PI15/PJ0/PJ1/PJ2/PJ3/PJ4/PJ5/PJ6
164   - G0-G7 : PJ7/PJ8/PJ9/PJ10/PJ11/PK0/PK1/PK2
165   - B0-B7 : PJ12/PK13/PJ14/PJ15/PK3/PK4/PK5/PK6
166   - DE/CLK/HSYNC/VSYNC : PK7/PI14/PI12/PI13
167
168
169System Clock
170============
171
172The STM32F746G System Clock can be driven by an internal or external oscillator,
173as well as by the main PLL clock. By default, the System clock is driven by the PLL
174clock at 216MHz, driven by a 25MHz high speed external clock.
175
176Serial Port
177===========
178
179The STM32F746G Discovery kit has up to 8 UARTs. The Zephyr console output is assigned to UART1
180which connected to the onboard ST-LINK/V2 Virtual COM port interface. Default communication
181settings are 115200 8N1.
182
183Programming and Debugging
184*************************
185
186Applications for the ``stm32f746g_disco`` board configuration can be built and
187flashed in the usual way (see :ref:`build_an_application` and
188:ref:`application_run` for more details).
189
190Flashing
191========
192
193STM32F746G Discovery kit includes an ST-LINK/V2 embedded debug tool interface.
194This interface is supported by the openocd version included in the Zephyr SDK.
195
196Flashing an application to STM32F746G
197-------------------------------------------
198
199First, connect the STM32F746G Discovery kit to your host computer using
200the USB port to prepare it for flashing. Then build and flash your application.
201
202Here is an example for the :ref:`hello_world` application.
203
204.. zephyr-app-commands::
205   :zephyr-app: samples/hello_world
206   :board: stm32f746g_disco
207   :goals: build flash
208
209Run a serial host program to connect with your board:
210
211.. code-block:: console
212
213   $ minicom -D /dev/ttyACM0
214
215You should see the following message on the console:
216
217.. code-block:: console
218
219   Hello World! arm
220
221Debugging
222=========
223
224You can debug an application in the usual way.  Here is an example for the
225:ref:`hello_world` application.
226
227.. zephyr-app-commands::
228   :zephyr-app: samples/hello_world
229   :board: stm32f746g_disco
230   :goals: debug
231
232
233.. _32F746G-DISCO website:
234   https://www.st.com/en/evaluation-tools/32f746gdiscovery.html
235
236.. _32F746G-DISCO board User Manual:
237   https://www.st.com/resource/en/user_manual/dm00190424.pdf
238
239.. _STM32F746NGH6 on www.st.com:
240   https://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f7-series/stm32f7x6/stm32f746ng.html
241
242.. _STM32F74xxx reference manual:
243   https://www.st.com/resource/en/reference_manual/dm00124865.pdf
244