STM32F072B Discovery
Overview
The STM32F072B-DISCO Discovery kit features an ARM Cortex-M0 based STM32F072RB MCU with everything required for beginners and experienced users to get started quickly. Here are some highlights of the STM32F072B-DISCO board:
STM32 microcontroller in LQFP64 package
Extension header for LQFP64 I/Os for a quick connection to the prototyping board and easy probing
On-board ST-LINK/V2, debugger/programmer with SWD connector
Board power supply: through USB bus or from an external 5 V supply voltage
External application power supply: 3 V and 5 V
Six LEDs:
LD1 (red/green) for USB communication
LD2 (red) for 3.3 V power on
Four user LEDs: LD3 (orange), LD4 (green), LD5 (red) and LD6 (blue)
Two push-buttons: USER and RESET
USB USER with Mini-B connector
L3GD20, ST MEMS motion sensor, 3-axis digital output gyroscope
One linear touch sensor or four touch keys
RF EEprom daughter board connector
More information about the board can be found at the STM32F072B-DISCO website [1].
Hardware
STM32F072B-DISCO Discovery kit provides the following hardware components:
STM32F072RBTT6 in LQFP64 package
ARM® 32-bit Cortex® -M0 CPU
48 MHz max CPU frequency
VDD from 2.0 V to 3.6 V
128 KB Flash
16 KB SRAM
GPIO with external interrupt capability
12-bit ADC with 39 channels
12-bit D/A converters
RTC
General Purpose Timers (12)
USART/UART (4)
I2C (2)
SPI (2)
CAN
USB 2.0 full speed interface
DMA Controller
24 capacitive sensing channels for touchkey, linear and rotary touch sensors
- More information about STM32F072RB can be found here:
Supported Features
The stm32f072b_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.
stm32f072b_disco/stm32f072xb
target
Type |
Location |
Description |
Compatible |
---|---|---|---|
CPU |
on-chip |
ARM Cortex-M0 CPU1 |
|
ADC |
on-chip |
STM32 ADC1 |
|
CAN |
on-chip |
STM32 CAN controller1 |
|
Clock control |
on-chip |
STM32F0/G0 RCC (Reset and Clock controller)1 |
|
on-chip |
STM32 HSE Clock1 |
||
on-chip |
|||
on-chip |
STM32 LSE Clock1 |
||
on-chip |
STM32F0/F3 Main PLL1 |
||
Counter |
on-chip |
STM32 counters5 |
|
DAC |
on-chip |
STM32 family DAC1 |
|
DMA |
on-chip |
STM32 DMA controller (V2bis) for the stm32F0, stm32F1 and stm32L1 soc families1 |
|
Flash controller |
on-chip |
STM32 Family flash controller1 |
|
GPIO & Headers |
on-chip |
STM32 GPIO Controller6 |
|
I2C |
on-chip |
STM32 I2C V2 controller2 |
|
Input |
on-board |
Group of GPIO-bound input keys1 |
|
Interrupt controller |
on-chip |
ARMv6-M NVIC (Nested Vectored Interrupt Controller) controller1 |
|
on-chip |
STM32 External Interrupt Controller1 |
||
LED |
on-board |
Group of GPIO-controlled LEDs1 |
|
on-board |
Group of PWM-controlled LEDs1 |
||
Memory controller |
on-chip |
STM32 Battery Backed RAM1 |
|
MTD |
on-chip |
STM32 flash memory1 |
|
PHY |
on-chip |
This binding is to be used by all the usb transceivers which are built-in with USB IP1 |
|
Pin control |
on-chip |
STM32 Pin controller1 |
|
PWM |
on-chip |
||
Reset controller |
on-chip |
STM32 Reset and Clock Control (RCC) Controller1 |
|
RTC |
on-chip |
STM32 RTC1 |
|
Sensors |
on-chip |
STM32 VREF+1 |
|
on-chip |
STM32 family TEMP node for production calibrated sensors with two calibration temperatures1 |
||
on-chip |
STM32 VBAT1 |
||
Serial controller |
on-chip |
||
SMbus |
on-chip |
STM32 SMBus controller2 |
|
SPI |
on-chip |
||
SRAM |
on-chip |
Generic on-chip SRAM description1 |
|
Timer |
on-chip |
ARMv6-M System Tick1 |
|
on-chip |
|||
USB |
on-chip |
STM32 USB controller1 |
|
Watchdog |
on-chip |
STM32 watchdog1 |
|
on-chip |
STM32 system window watchdog1 |
Note
CAN feature requires CAN transceiver, such as SK Pang CAN breakout board [5].
Pin Mapping
STM32F072B-DISCO Discovery kit has 6 GPIO controllers. These controllers are responsible for pin muxing, input/output, pull-up, etc.
For more details please refer to STM32F072B-DISCO board User Manual [2].
Default Zephyr Peripheral Mapping:
UART_1_TX : PB6
UART_1_RX : PB7
I2C1_SCL : PB8
I2C1_SDA : PB9
I2C2_SCL : PB10
I2C2_SDA : PB11
SPI1_SCK : PB3
SPI1_MISO : PB4
SPI1_MOSI : PB5
USER_PB : PA0
LD3 : PC6
LD4 : PC8
LD5 : PC9
LD6 : PC7
CAN_RX : PB8
CAN_TX : PB9
System Clock
STM32F072B-DISCO System Clock could be driven by internal or external oscillator, as well as main PLL clock. By default System clock is driven by PLL clock at 72 MHz, driven by internal 8 MHz oscillator.
Serial Port
STM32F072B-DISCO Discovery kit has up to 4 UARTs. The Zephyr console output is assigned to UART 1. Default settings are 115200 8N1.
Programming and Debugging
STM32F072B-DISCO board includes an ST-LINK/V2 embedded debug tool interface.
Applications for the stm32f072b_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 [6] runner, so its installation is required.
Alternatively, OpenOCD or JLink can also be used to flash the board using
the --runner
(or -r
) option:
$ west flash --runner openocd
$ west flash --runner jlink
Flashing an application to STM32F072B-DISCO
First, connect the STM32F072B-DISCO Discovery kit to your host computer using the USB port to prepare it for flashing. Then build and flash your application.
Here is an example for the Hello World application.
# From the root of the zephyr repository
west build -b stm32f072b_disco samples/hello_world
west flash
Run a serial host program to connect with your board. A TTL(3.3V) serial adapter is required.
$ minicom -D /dev/<tty device>
Replace <tty_device> with the port where the serial adapter can be found. For example, under Linux, /dev/ttyUSB0.
You should see the following message on the console:
Hello World! arm
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 stm32f072b_disco samples/hello_world
west debug