1.. zephyr:board:: b_g474e_dpow1
2
3Overview
4********
5The B-G474E-DPOW1 Discovery kit is a digital power solution and a complete
6demonstration and development platform for the STMicroelectronics STM32G474RET6
7microcontroller. Leveraging the new HRTimer-oriented features, 96 Kbytes of
8embedded RAM, math accelerator functions and USB-PD 3.0 offered by STM32G474RET6,
9the B-G474E-DPOW1 Discovery kit, based on the USB 2.0 FS Type-C™ connector
10interface, helps the user to prototype applications with digital power such as a
11buck-boost converter, RGB power LED lighting or a class-D audio amplifier. The
12B-G474E-DPOW1 Discovery kit does not require any separate probe, as it integrates
13the STLINK-V3E debugger and programmer.
14
15- STM32G474RET6 Arm® Cortex®-M4 core-based microcontroller, featuring 512 Kbytes
16  of Flash memory and 128 Kbytes of SRAM, in LQFP64 package
17- USB Type-C™ with USB 2.0 FS interface compatible with USB-PD 3.0
18- RGB power LED for a bright lighting
19- Digital power buck-boost converter with internal or external Input voltage and
20  with onboard resistor loads
21- Audio Class-D amplifier capable
22- 4 user LEDs
23- 3 LEDs for power and ST-LINK communication
24- 4-direction joystick with a selection button
25- Reset push-button
26- Board connectors:
27    - USB Type-C™
28    - USB Micro-B
29    - 2 x 32-pin header, 2.54 mm pitch, daughterboard extension connector for breadboard connection
30- Flexible power-supply options: ST-LINK USB VBUS or USB Type-C™ VBUS or external source
31- On-board STLINK-V3E debugger/programmer with USB re-enumeration capability: mass storage,
32  Virtual COM port, and debug port
33
34More information about the board can be found at the `B-G474E-DPOW1 website`_.
35
36
37More information about STM32G474RE can be found here:
38
39- `G474RE on www.st.com`_
40- `STM32G4 reference manual`_
41
42
43Supported Features
44==================
45
46The Zephyr b_g474e_dpow1 board configuration supports the following hardware features:
47
48+-----------+------------+-------------------------------------+
49| Interface | Controller | Driver/Component                    |
50+===========+============+=====================================+
51| NVIC      | on-chip    | nested vector interrupt controller  |
52+-----------+------------+-------------------------------------+
53| UART      | on-chip    | serial port-polling;                |
54|           |            | serial port-interrupt               |
55+-----------+------------+-------------------------------------+
56| GPIO      | on-chip    | gpio                                |
57+-----------+------------+-------------------------------------+
58| USB       | on-chip    | usb                                 |
59+-----------+------------+-------------------------------------+
60| UCPD      | on-chip    | ucpd                                |
61+-----------+------------+-------------------------------------+
62| WATCHDOG  | on-chip    | independent watchdog                |
63+-----------+------------+-------------------------------------+
64
65Other hardware features are not yet supported in this Zephyr port.
66
67The default configuration can be found in the defconfig file:
68:zephyr_file:`boards/st/b_g474e_dpow1/b_g474e_dpow1_defconfig`
69
70Connections and IOs
71===================
72
73Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as
74input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the
75GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current
76capable except for analog inputs.
77
78Default Zephyr Peripheral Mapping:
79----------------------------------
80
81- UART_3 TX/RX       : PC10/PC11 (ST-Link Virtual Port Com)
82- BUTTON (JOY_SEL)   : PC13
83- BUTTON (JOY_LEFT)  : PC4
84- BUTTON (JOY_DOWN)  : PC5
85- BUTTON (JOY_RIGHT) : PB2
86- BUTTON (JOY_UP)    : PB10
87- LED (DOWN BLUE)    : PA15
88- LED (LEFT ORANGE)  : PB1
89- LED (UP RED)       : PB5
90- LED (RIGHT GREEN)  : PB7
91- USB DM             : PA11
92- USB DP             : PA12
93- UCPD CC2           : PB4
94- UCPD CC1           : PB6
95
96For more details please refer to `B-G474E-DPOW1 Discovery board User Manual`_.
97
98Programming and Debugging
99*************************
100
101The B-G474E-DPOW1 Discovery board includes an ST-LINK/V3E embedded debug tool interface.
102
103Applications for the ``b_g474e_dpow1`` board configuration can be built and
104flashed in the usual way (see :ref:`build_an_application` and
105:ref:`application_run` for more details).
106
107Flashing
108========
109
110The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
111so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
112
113.. code-block:: console
114
115   $ west flash
116
117Flashing an application to the B_G474E_DPOW1
118--------------------------------------------
119
120Here is an example for the :zephyr:code-sample:`blinky` application.
121
122.. zephyr-app-commands::
123   :zephyr-app: samples/basic/blinky
124   :board: b_g474e_dpow1
125   :goals: build flash
126
127You will see the LED blinking every second.
128
129Debugging
130=========
131
132You can debug an application in the usual way. Here is an example for the
133:zephyr:code-sample:`hello_world` application.
134
135.. zephyr-app-commands::
136   :zephyr-app: samples/hello_world
137   :board: b_g474e_dpow1
138   :maybe-skip-config:
139   :goals: debug
140
141References
142**********
143
144.. target-notes::
145
146.. _B-G474E-DPOW1 website:
147   https://www.st.com/en/evaluation-tools/b-g474e-dpow1.html
148
149.. _STM32G4 reference manual:
150   https://www.st.com/resource/en/reference_manual/rm0440-stm32g4-series-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
151
152.. _B-G474E-DPOW1 Discovery board User Manual:
153   https://www.st.com/resource/en/user_manual/um2577-discovery-kit-with-stm32g474re-mcu-stmicroelectronics.pdf
154
155.. _G474RE on www.st.com:
156   https://www.st.com/en/microcontrollers-microprocessors/stm32g474re.html
157
158.. _STM32CubeProgrammer:
159   https://www.st.com/en/development-tools/stm32cubeprog.html
160