Clicker 2 for STM32
Overview
MikroE Clicker 2 for STM32 is a development board containing an STM32F407 microcontroller. It is equipped with two mikrobus sockets and furthermore has two headers for general signal break out. The board also has battery connection and a battery management unit on board. It can be powered either from a battery pack, such as a LiPo or from USB. The board is equipped with a 25MHz crystal as well as a 32.768kHz clock crystal.
Hardware
The Clicker 2 board contains the following connections:
Two MikroBUS connectors
Two headers with general connections
Furthermore the board contains two LEDs and two push buttons that are connected to the microcontroller.
Supported Features
The mikroe_clicker_2
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.
Type |
Location |
Description |
Compatible |
---|---|---|---|
CPU |
on-chip |
ARM Cortex-M4F CPU1 |
|
ADC |
on-chip |
STM32F4 ADC1 |
|
on-chip |
STM32 ADC2 |
||
CAN |
on-chip |
STM32 CAN controller2 |
|
Clock control |
on-chip |
STM32 RCC (Reset and Clock controller)1 |
|
on-chip |
STM32 HSE Clock1 |
||
on-chip |
|||
on-chip |
STM32F4 Main PLL1 |
||
on-chip |
STM32F4 PLL I2S1 |
||
on-chip |
STM32 Microcontroller Clock Output (MCO)2 |
||
Counter |
on-chip |
STM32 counters12 |
|
DAC |
on-chip |
STM32 family DAC1 |
|
DMA |
on-chip |
STM32 DMA controller (V1)2 |
|
Ethernet |
on-chip |
ST STM32 Ethernet1 |
|
Flash controller |
on-chip |
STM32 Family flash controller1 |
|
GPIO & Headers |
on-chip |
STM32 GPIO Controller9 |
|
I2C |
on-chip |
||
I2S |
on-chip |
STM32 I2S controller2 |
|
Input |
on-board |
Group of GPIO-bound input keys1 |
|
Interrupt controller |
on-chip |
ARMv7-M NVIC (Nested Vectored Interrupt Controller)1 |
|
on-chip |
STM32 External Interrupt Controller1 |
||
LED |
on-board |
Group of GPIO-controlled LEDs1 |
|
Memory controller |
on-chip |
STM32 Battery Backed RAM1 |
|
MMC |
on-chip |
STM32 SDMMC Disk Access1 |
|
MTD |
on-chip |
STM32F4 flash memory1 |
|
PHY |
on-chip |
This binding is to be used by all the usb transceivers which are built-in with USB IP2 |
|
Pin control |
on-chip |
STM32 Pin controller1 |
|
PWM |
on-chip |
STM32 PWM12 |
|
Reset controller |
on-chip |
STM32 Reset and Clock Control (RCC) Controller1 |
|
RNG |
on-chip |
STM32 Random Number Generator1 |
|
RTC |
on-chip |
STM32 RTC1 |
|
Sensors |
on-chip |
STM32 quadrature decoder6 |
|
on-chip |
STM32 family TEMP node for production calibrated sensors with two calibration temperatures1 |
||
on-chip |
STM32 VREF+1 |
||
on-chip |
STM32 VBAT1 |
||
Serial controller |
on-chip |
||
on-chip |
|||
SMbus |
on-chip |
STM32 SMBus controller3 |
|
SPI |
on-chip |
||
SRAM |
on-chip |
Generic on-chip SRAM description1 |
|
Timer |
on-chip |
ARMv7-M System Tick1 |
|
on-chip |
STM32 timers14 |
||
USB |
on-chip |
STM32 OTGFS controller1 |
|
on-chip |
STM32 OTGHS controller1 |
||
Watchdog |
on-chip |
STM32 watchdog1 |
|
on-chip |
STM32 system window watchdog1 |
Connections and IOs
The two mikroBUS interfaces are aliased in the device tree so that their
peripherals can be accessed using mikrobus_N_INTERFACE
so e.g. the spi on
bus 2 can be found by the alias mikrobus_2_spi
. The counting corresponds
with the marking on the board.
For connections on the edge connectors, please refer to Clicker 2 for STM32 User Manual.
Programming and Debugging
Applications for the mikroe_clicker_2
board configuration can
be built and flashed in the usual way (see Building an Application and
Run an Application for more details).
Flashing
The initial state of the board is set to lock. When you flash, it will fail with the message:
Error: stm32x device protected
Unlocking with openocd makes it possible to flash.
$ openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg \
-f /usr/share/openocd/scripts/target/stm32f4x.cfg -c init\
-c "reset halt" -c "stm32f4x unlock 0" -c "reset run" -c shutdown
Here is an example for the Hello World application.
# From the root of the zephyr repository
west build -b mikroe_clicker_2 samples/hello_world
west flash
You should see the following message on the console:
Hello World! mikroe_clicker_2
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 mikroe_clicker_2 samples/hello_world
west debug