STM32G071B Discovery

Overview

The STM32G071B-DISCO Discovery board is a demonstration and development platform for the STMicroelectronics Arm® Cortex® -M0+ core-based STM32G071RB USB Type-C™ and Power Delivery microcontroller. The STM32G071B-DISCO Discovery board is presented with all necessary interfaces for easy connection and interoperability with other USB Type-C™ devices. The STM32G071B-DISCO Discovery board is intended for discovery and display of USB Type-C™ port characteristics such as data role, power role, VBUS and IBUS monitoring. It offers an advanced user mode when associated with the STM32CubeMonUCPD software GUI and can be used as a USB Type-C™ and Power Delivery analyzer.

  • STM32G071RBT6 microcontroller featuring 128 Kbytes of Flash memory and 32 Kbytes of RAM in LQFP64 package

  • Plastic case

  • 1” 128 x 64 pixels OLED LCD module with SPI interface

  • USB Type-C™ interface plug cable and receptacle connector accessible by door with reed sensor detection

  • 3 bidirectional current and power monitors with I2C interface to measure VBUS, CC1 and CC2 protected and isolated lines

  • On-board DC/DC converter to sustain power supply with VBUS varying from 3 V to 20 V (+/- 5 %)

  • 4 user status LEDs about USB Type-C™ configuration

  • 3 LEDs for power and ST-LINK communication

  • 4-way joystick with selection button

  • 1 reset push-button

  • Board external connectors:
    • USB Type-C™ plug cable

    • USB Type-C™ receptacle connector

    • 8-pin user extension connector including ADC, SPI, USART and I2C communication signals

    • USB with Micro-AB (ST-LINK)

  • Board internal connectors:
    • 2 x 8-pin GPIOs free pins from microcontroller

      (accessible internally when case is removed)

    • USB Type-C™ test points for main signals

  • Flexible power-supply options: ST-LINK USB VBUS or USB Type-C™ VBUS

  • On-board ST-LINK/V2-1 debugger/programmer with USB enumeration capability: mass storage, Virtual COM port and debug port

More information about the board can be found at the STM32G071B-DISCO website [1].

More information about STM32G071RB can be found here:

Supported Features

The stm32g071b_disco board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.

stm32g071b_disco/stm32g071xx target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M0+ CPU1

arm,cortex-m0+

ADC

on-chip

STM32 ADC1

st,stm32-adc

Clock control

on-chip

STM32F0/G0 RCC (Reset and Clock controller)1

st,stm32f0-rcc

on-chip

STM32 HSE Clock1

st,stm32-hse-clock

on-chip

STM32G0 HSI Clock1

st,stm32g0-hsi-clock

on-chip

STM32 LSE Clock1

st,stm32-lse-clock

on-chip

Generic fixed-rate clock provider1

fixed-clock

on-chip

STM32G0 main PLL1

st,stm32g0-pll-clock

Counter

on-chip

STM32 counters8

st,stm32-counter

DAC

on-chip

STM32 family DAC1

st,stm32-dac

DMA

on-chip

STM32 DMA controller (V2)1

st,stm32-dma-v2

on-chip

STM32 DMAMUX controller1

st,stm32-dmamux

Flash controller

on-chip

STM32 Family flash controller1

st,stm32-flash-controller

GPIO & Headers

on-chip

STM32 GPIO Controller5

st,stm32-gpio

I2C

on-chip

STM32 I2C V2 controller1 1

st,stm32-i2c-v2

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv6-M NVIC (Nested Vectored Interrupt Controller) controller1

arm,v6m-nvic

on-chip

STM32G0 External Interrupt Controller1

st,stm32g0-exti

LED

on-board

Group of GPIO-controlled LEDs2

gpio-leds

Memory controller

on-chip

STM32 Battery Backed RAM1

st,stm32-bbram

MTD

on-chip

STM32 flash memory1

st,stm32-nv-flash

Pin control

on-chip

STM32 Pin controller1

st,stm32-pinctrl

PWM

on-chip

STM32 PWM7

st,stm32-pwm

Reset controller

on-chip

STM32 Reset and Clock Control (RCC) Controller1

st,stm32-rcc-rctl

RTC

on-chip

STM32 RTC1

st,stm32-rtc

Sensors

on-board

TI INA230, INA231 and INA236 Bidirectional Current and Power Monitor1

ti,ina230

on-chip

STM32 family TEMP node for production calibrated sensors with two calibration temperatures1

st,stm32-temp-cal

on-chip

STM32 VREF+1

st,stm32-vref

on-chip

STM32 VBAT1

st,stm32-vbat

Serial controller

on-chip

STM32 USART1 3

st,stm32-usart

on-chip

STM32 LPUART1

st,stm32-lpuart

SMbus

on-chip

STM32 SMBus controller2

st,stm32-smbus

SPI

on-chip

STM32 SPI controller with embedded Rx and Tx FIFOs2

st,stm32-spi-fifo

SRAM

on-chip

Generic on-chip SRAM description1

mmio-sram

USB Type-C Port Controller

on-chip

STM32 USB Type-C / Power Delivery1 1

st,stm32-ucpd

Timer

on-chip

ARMv6-M System Tick1

arm,armv6m-systick

on-chip

STM32 low-power timer (LPTIM)1

st,stm32-lptim

on-chip

STM32 timers9

st,stm32-timers

Watchdog

on-chip

STM32 watchdog1

st,stm32-watchdog

on-chip

STM32 system window watchdog1

st,stm32-window-watchdog

Connections and IOs

Each of the GPIO pins can be configured by software as output (push-pull or open-drain), as input (with or without pull-up or pull-down), or as peripheral alternate function. Most of the GPIO pins are shared with digital or analog alternate functions. All GPIOs are high current capable except for analog inputs.

Default Zephyr Peripheral Mapping:

  • UART_3 TX/RX : PC10/PC11 (ST-Link Virtual Port Com)

  • UCPD1 : PA8/PB15

  • BUTTON (JOY_SEL) : PC0

  • BUTTON (JOY_LEFT) : PC1

  • BUTTON (JOY_DOWN) : PC2

  • BUTTON (JOY_RIGHT) : PC3

  • BUTTON (JOY_UP) : PC4

  • LED (TO_REC) : PD9

  • LED (TO_PLUG) : PD8

  • LED (SINK_SPY) : PD5

  • LED (SOURCE) : PC12

  • ENCC1 : PB10 (Enable CC1)

  • ENCC2 : PB11 (Enable CC2)

  • RDCC1 : PB12 (Enable Door Sense on CC1)

For more details please refer to STM32G0 Discovery board User Manual [3].

Programming and Debugging

The STM32G071B Discovery board includes an ST-LINK/V2-1 embedded debug tool interface.

Applications for the stm32g071b_disco board configuration can be built and flashed in the usual way (see Building an Application and Run an Application for more details).

Flashing

The board is configured to be flashed using west STM32CubeProgrammer [5] runner, so its installation is required.

$ west flash

Flashing an application to the STM32G071B_DISCO

Here is an example for the Blinky application.

# From the root of the zephyr repository
west build -b stm32g071b_disco samples/basic/blinky
west flash

You will see the LED blinking every second.

Debugging

You can debug an application in the usual way. Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b stm32g071b_disco samples/hello_world
west debug

References