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