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 Qwiic [3] or STEMMA QT [6] connector

  • 1 mikroBUS [2] socket

  • 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

arm,cortex-m0+

ADC

on-chip

Raspberry Pi Pico ADC1

raspberrypi,pico-adc

Clock control

on-chip

Raspberry Pi Pico clock controller node1

raspberrypi,pico-clock-controller

on-chip

The representation of Raspberry Pi Pico’s clock112

raspberrypi,pico-clock

on-chip

The representation of Raspberry Pi Pico’s PLL2

raspberrypi,pico-pll

on-chip

The representation of Raspberry Pi Pico ring oscillator1

raspberrypi,pico-rosc

on-chip

The representation of Raspberry Pi Pico external oscillator1

raspberrypi,pico-xosc

Counter

on-chip

Raspberry Pi Pico timer1

raspberrypi,pico-timer

DMA

on-chip

Raspberry Pi Pico DMA1

raspberrypi,pico-dma

Flash controller

on-chip

Raspberry Pi Pico flash controller1

raspberrypi,pico-flash-controller

Fuel gauge

on-board

Maxim MAX17048 Fuel Gauge with ModelGauge1

maxim,max17048

GPIO & Headers

on-chip

Raspberry Pi Pico GPIO1

raspberrypi,pico-gpio

on-chip

Raspberry Pi Pico GPIO Port1

raspberrypi,pico-gpio-port

on-board

STEMMA QT is a 4-pin JST-SH connector for I2C devices1

stemma-qt-connector

on-board

GPIO pins exposed on Mikro BUS headers1

mikro-bus

on-board

GPIO pins exposed on Adafruit Feather headers1

adafruit-feather-header

I2C

on-chip

Raspberry Pi Pico I2C11

raspberrypi,pico-i2c

Interrupt controller

on-chip

ARMv6-M NVIC (Nested Vectored Interrupt Controller) controller1

arm,v6m-nvic

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

on-board

Group of PWM-controlled LEDs1

pwm-leds

LED strip

on-board

The pio node configured for ws28121

worldsemi,ws2812-rpi_pico-pio

Miscellaneous

on-chip

Raspberry Pi Pico PIO11

raspberrypi,pico-pio

MTD

on-chip

Flash node1

soc-nv-flash

on-chip

Fixed partitions of a flash (or other non-volatile storage) memory1

fixed-partitions

Pin control

on-chip

Raspberry Pi Pico Pin Controller1

raspberrypi,pico-pinctrl

PWM

on-chip

Raspberry Pi Pico PWM1

raspberrypi,pico-pwm

Regulator

on-chip

Raspberry Pi Pico core supply regurator1

raspberrypi,core-supply-regulator

Reset controller

on-chip

Raspberry Pi Pico Reset Controller1

raspberrypi,pico-reset

RTC

on-chip

Raspberry Pi Pico RTC1

raspberrypi,pico-rtc

Sensors

on-chip

Raspberry Pi Pico family temperature sensor node1

raspberrypi,pico-temp

Serial controller

on-chip

Raspberry Pi Pico UART11

raspberrypi,pico-uart

SPI

on-chip

Raspberry Pi Pico SPI2

raspberrypi,pico-spi

SRAM

on-chip

Generic on-chip SRAM1

mmio-sram

Timer

on-chip

ARMv6-M System Tick1

arm,armv6m-systick

USB

on-chip

Raspberry Pi Pico USB Device Controller1

raspberrypi,pico-usbd

Watchdog

on-chip

Raspberry Pi Pico Watchdog1

raspberrypi,pico-watchdog

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.