Sparkfun RP2040 mikroBUS Development Board
Overview
The SparkFun RP2040 mikroBUS Development Board [1] is a low-cost, high performance platform with flexible digital interfaces. It is equipped with an RP2040 SoC, an on-board RESET and BOOTSEL button, a blue user LED for status or test, a WS2812 addressable LED, a USB connector, a microSD card slot, a mikroBUS socket, a Qwiic connector, a JST single cell battery connector with a charging circuit and fuel gauge sensor and yellow LED as battery charging indicator, a Thing Plus or Feather PTH pin layout, and JTAG PTH pins. The USB bootloader allows it to be flashed without any adapter, in a drag-and-drop manner.
Hardware
Dual core Arm Cortex-M0+ processor running up to 133MHz
264KB on-chip SRAM
16MB on-board QSPI flash with XIP capabilities
8 GPIO pins
4 Analog inputs
1 UART peripherals
1 SPI controllers
2 I2C controllers (one via Qwiic connector)
16 PWM channels
USB 1.1 controller (host/device)
8 Programmable I/O (PIO) for custom peripherals
1 Watchdog timer peripheral
On-board digital RGB LED (WS2812)
On-board general purpose user LED (blue)
On-board charging status LED (yellow)
On-board power status LED (red)
1 microSD card slot
1 Thing Plus [4] or Feather [5] pin header
Supported Features
The sparkfun_rp2040_mikrobus 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.
sparkfun_rp2040_mikrobus/rp2040 target
Type |
Location |
Description |
Compatible |
|---|---|---|---|
CPU |
on-chip |
ARM Cortex-M0+ CPU2 |
|
ADC |
on-chip |
Raspberry Pi Pico ADC1 |
|
Clock control |
on-chip |
Raspberry Pi Pico clock controller node1 |
|
on-chip |
|||
on-chip |
The representation of Raspberry Pi Pico’s PLL2 |
||
on-chip |
The representation of Raspberry Pi Pico ring oscillator1 |
||
on-chip |
The representation of Raspberry Pi Pico external oscillator1 |
||
Counter |
on-chip |
Raspberry Pi Pico timer1 |
|
DMA |
on-chip |
Raspberry Pi Pico DMA1 |
|
Flash controller |
on-chip |
Raspberry Pi Pico flash controller1 |
|
Fuel gauge |
on-board |
Maxim MAX17048 Fuel Gauge with ModelGauge1 |
|
GPIO & Headers |
on-chip |
Raspberry Pi Pico GPIO1 |
|
on-chip |
Raspberry Pi Pico GPIO Port1 |
||
on-board |
STEMMA QT is a 4-pin JST-SH connector for I2C devices1 |
||
on-board |
GPIO pins exposed on Mikro BUS headers1 |
||
on-board |
GPIO pins exposed on Adafruit Feather headers1 |
||
I2C |
on-chip |
||
Interrupt controller |
on-chip |
ARMv6-M NVIC (Nested Vectored Interrupt Controller) controller1 |
|
LED |
on-board |
Group of GPIO-controlled LEDs1 |
|
on-board |
Group of PWM-controlled LEDs1 |
||
LED strip |
on-board |
The pio node configured for ws28121 |
|
Miscellaneous |
on-chip |
||
MTD |
on-chip |
Flash node1 |
|
on-chip |
Fixed partitions of a flash (or other non-volatile storage) memory1 |
||
Pin control |
on-chip |
Raspberry Pi Pico Pin Controller1 |
|
PWM |
on-chip |
Raspberry Pi Pico PWM1 |
|
Regulator |
on-chip |
Raspberry Pi Pico core supply regurator1 |
|
Reset controller |
on-chip |
Raspberry Pi Pico Reset Controller1 |
|
RTC |
on-chip |
Raspberry Pi Pico RTC1 |
|
Sensors |
on-chip |
Raspberry Pi Pico family temperature sensor node1 |
|
Serial controller |
on-chip |
||
SPI |
on-chip |
Raspberry Pi Pico SPI2 |
|
SRAM |
on-chip |
Generic on-chip SRAM1 |
|
Timer |
on-chip |
ARMv6-M System Tick1 |
|
USB |
on-chip |
Raspberry Pi Pico USB Device Controller1 |
|
Watchdog |
on-chip |
Raspberry Pi Pico Watchdog1 |
Flash Partitioning
The 16MB QSPI flash is partitioned into the following two main blocks by default. At the beginning is a 1MB section for program code (including the 256 bytes of boot information), followed by a 15MB storage area for application data or file systems.
Pin Mapping
The peripherals of the RP2040 SoC can be routed to various pins on the board. The configuration of these routes can be modified through DTS. Please refer to the datasheet to see the possible routings for each peripheral.
Default Zephyr Peripheral Mapping:
UART0_TX : P0
UART0_RX : P1
SPI0_SCK : P2
SPI0_TX : P3
SPI0_RX : P4
SPI0_CSn : P5
I2C1_SDA : P6
I2C1_SCL : P7 & P23
WS2812_DI : P8 (PIO0)
SDIO_DAT3 : P9 (SPI1_CSn)
SDIO_DAT2 : P10
SDIO_DAT1 : P11
SDIO_DAT0 : P12 (SPI1_RX)
SDIO_CLK : P14 (SPI1_SCK)
SDIO_CMD : P15 (SPI1_TX)
BATT_ALERT : P24
LED_BUILTIN : P25
ADC0 : P26
ADC1 : P27
ADC2 : P28
ADC3 : P29
AVDD = 3V3
Programming and Debugging
The sparkfun_rp2040_mikrobus board supports the runners and associated west commands listed below.
| flash | debug | rtt | debugserver | attach | |
|---|---|---|---|---|---|
| blackmagicprobe | ✅ | ✅ | ✅ | ||
| jlink | ✅ | ✅ | ✅ | ✅ | ✅ |
| openocd | ✅ | ✅ (default) | ✅ | ✅ | ✅ |
| pyocd | ✅ | ✅ | ✅ | ✅ | ✅ |
| uf2 | ✅ (default) |
Flashing
Using JTAG
The RP2040 mikroBUS Development Board does make the SWD pins available on JTAG PTH pins in the middle of the board. You can solder a 2x5 1.27mm IDC pin header here, and use a JTAG/SWD debugger.
Using UF2
You can also flash the RP2040 mikroBUS Development Board with a UF2 file.
By default, building an app for this board will generate a
build/zephyr/zephyr.uf2 file. If the RP2040 mikroBUS Development
Board is powered on with the BOOTSEL button pressed, it will appear
on the host as a mass storage device. The UF2 file should be copied to
the device, which will flash the RP2040 mikroBUS Development Board.