1.. zephyr:board:: stm32g081b_eval 2 3Overview 4******** 5The STM32G081B-EVAL Evaluation board is a high-end development platform, for 6Arm Cortex-M0+ core-based STM32G081RBT6 microcontroller, with USB Type-C and 7power delivery controller interfaces (UCPD), compliant with USB type-C r1.2 8and USB PD specification r3.0, two I2Cs, two SPIs, five USARTs, one LP UART, 9one 12-bit ADC, two 12-bit DACs, two GP comparators, two LP timers, internal 1032 KB SRAM and 128 KB Flash, CEC, SWD debugging support. The full range of 11hardware features on the STM32G081B-EVAL Evaluation board includes a mother 12board, a legacy peripheral daughterboard and a USB-C and Power Delivery 13daughterboard, which help to evaluate all peripherals (USB Type-C connector 14with USB PD, motor control connector, RS232, RS485, Audio DAC, microphone ADC, 15TFT LCD, IrDA, IR LED, IR receiver, LDR, MicroSD card, CEC on two HDMI 16connectors, smart card slot, RF E2PROM & Temperature sensor…), and to develop 17applications. 18 19The board integrates an ST-LINK/V2-1 as an embedded in-circuit debugger and 20programmer for the STM32 MCU. The daughterboard and extension connectors 21provide an easy way to connect a daughterboard or wrapping board for the 22user's specific applications. 23 24The USB-C and Power Delivery daughterboard 25features two independent USB-C ports controlled by an STM32G0. USB-C port 1 26is dual role power (DRP) and can provide up-to 45 W. USB-C Port 2 is sink 27only. Both support USB PD protocol and alternate mode functionality. 28 29Application firmware examples are provided to evaluate the USB-C technology 30through various use cases. 31 32 33 34- Mother board 35 - STM32G081RBT6 microcontroller with 128 Kbytes of Flash memory and 36 32 Kbytes of RAM in LQFP64 package 37 - MCU voltage choice fixed 3.3 V or adjustable from 1.65 V to 3.6 V 38 - I2C compatible serial interface 39 - RTC with backup battery 40 - 8-Gbyte or more SPI interface microSD card 41 - Potentiometer 42 - 4 color user LEDs and one LED as MCU low-power alarm 43 - Reset, Tamper and User buttons 44 - 4-direction control and selection joystick 45 - Board connectors: 46 - 5 V power jack 47 - RS-232 and RS485 communications 48 - Stereo audio jack including analog microphone input 49 - microSD card 50 - Extension I2C connector 51 - Motor-control connector 52 - Board extension connectors: 53 - Daughterboard connectors for legacy peripheral daughter board or 54 USB-C daughterboard 55 - Extension connectors for daughterboard or wire-wrap board 56 - Flexible power-supply options: 57 - 5 V power jack 58 - ST-LINK/V2-1 USB connector 59 - Daughterboard 60 - On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration 61 capability: mass storage, virtual COM port and debug port 62 - Legacy peripheral daughterboard 63 - IrDA transceiver 64 - IR LED and IR receiver 65 - Light dependent resistor (LDR) 66 - Temperature Sensor 67 - Board connectors: 68 - Two HDMI connectors with DDC and CEC 69 - Smart card slot 70 - USB-C and Power Delivery daughterboard 71 - Mux for USB3.1 Gen1 / DisplayPort input and Type-C port1 output 72 - Mux for Type-C port2 input and DisplayPort output / USB2.0 73 - VCONN on Type-C port1 74 - USB PD on Type-C port1 75 - Board connectors: 76 - Type-C port1 DRP (dual-role port) 77 - Type-C port2 Sink 78 - DisplayPort input 79 - DisplayPort output 80 - USB 3.1 Gen1 Type-B receptacle 81 - USB2.0 Type-A receptacle 82 - 19 V power jack for USB PD 83 84More information about the board can be found at the `STM32G081B-EVAL website`_. 85 86 87More information about STM32G081RB can be found here: 88 89- `G081RB on www.st.com`_ 90- `STM32G081 reference manual`_ 91 92 93Supported Features 94================== 95 96The Zephyr stm32g081b_eval board configuration supports the following hardware features: 97 98+-----------+------------+-------------------------------------+ 99| Interface | Controller | Driver/Component | 100+===========+============+=====================================+ 101| NVIC | on-chip | nested vector interrupt controller | 102+-----------+------------+-------------------------------------+ 103| UART | on-chip | serial port-polling; | 104| | | serial port-interrupt | 105+-----------+------------+-------------------------------------+ 106| UCPD | on-chip + ucpd | 107+-----------+------------+-------------------------------------+ 108| ADC | on-chip | adc | 109+-----------+------------+-------------------------------------+ 110| GPIO | on-chip | gpio | 111+-----------+------------+-------------------------------------+ 112| WATCHDOG | on-chip | independent watchdog | 113+-----------+------------+-------------------------------------+ 114 115Other hardware features are not yet supported in this Zephyr port. 116 117The default configuration can be found in the defconfig file: 118:zephyr_file:`boards/st/stm32g081b_eval/stm32g081b_eval_defconfig` 119 120Connections and IOs 121=================== 122 123Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as 124input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the 125GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current 126capable except for analog inputs. 127 128Default Zephyr Peripheral Mapping: 129---------------------------------- 130 131- UART_3 TX/RX : PC10/PC11 (ST-Link Virtual Port Com) 132- UCPD2 : PD0/PD2 133- BUTTON (JOY_SEL) : PA0 134- BUTTON (JOY_LEFT) : PC8 135- BUTTON (JOY_DOWN) : PC3 136- BUTTON (JOY_RIGHT) : PC7 137- BUTTON (JOY_UP) : PC2 138- VBUS DISCHARGE : PB14 139- LED1 : PD5 140- LED2 : PD6 141- LED3 : PD8 142- LED4 : PD9 143 144For more details please refer to `STM32G0 Evaluation board User Manual`_. 145 146Programming and Debugging 147************************* 148 149The STM32G081B Evaluation board includes an ST-LINK/V2-1 embedded debug tool interface. 150 151Applications for the ``stm32g081b_eval`` board configuration can be built and 152flashed in the usual way (see :ref:`build_an_application` and 153:ref:`application_run` for more details). 154 155Flashing 156======== 157 158The board is configured to be flashed using west `STM32CubeProgrammer`_ runner, 159so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required. 160 161.. code-block:: console 162 163 $ west flash 164 165Flashing an application to the STM32G081B_EVAL 166---------------------------------------------- 167 168Here is an example for the :zephyr:code-sample:`blinky` application. 169 170.. zephyr-app-commands:: 171 :zephyr-app: samples/basic/blinky 172 :board: stm32g081b_eval 173 :goals: build flash 174 175You will see the LED blinking every second. 176 177Debugging 178========= 179 180You can debug an application in the usual way. Here is an example for the 181:zephyr:code-sample:`hello_world` application. 182 183.. zephyr-app-commands:: 184 :zephyr-app: samples/hello_world 185 :board: stm32g081b_eval 186 :maybe-skip-config: 187 :goals: debug 188 189References 190********** 191 192.. target-notes:: 193 194.. _STM32G081B-EVAL website: 195 https://www.st.com/en/evaluation-tools/stm32g081b-eval.html 196 197.. _STM32G081 reference manual: 198 https://www.st.com/resource/en/reference_manual/rm0444-stm32g0x1-advanced-armbased-32bit-mcus-stmicroelectronics.pdf 199 200.. _STM32G0 Evaluation board User Manual: 201 https://www.st.com/resource/en/user_manual/um2403-evaluation-board-with-stm32g081rb-mcu-stmicroelectronics.pdf 202 203.. _G081RB on www.st.com: 204 https://www.st.com/en/microcontrollers/stm32g081rb.html 205 206.. _STM32CubeProgrammer: 207 https://www.st.com/en/development-tools/stm32cubeprog.html 208