Quantcast
Channel: SparkFun Tutorials
Viewing all articles
Browse latest Browse all 1123

MicroMod RP2040 Processor Board Hookup Guide

$
0
0

MicroMod RP2040 Processor Board Hookup Guide a learn.sparkfun.com tutorial

Available online at: http://sfe.io/t1495

Introduction

The MicroMod RP2040 Processor Board is a low-cost, high-performance board with flexible digital interfaces featuring the Raspberry Pi Foundation's RP2040 microcontroller. The board takes advantage of the MicroMod M.2 connector to easily swap out processor boards on carrier boards.

SparkFun MicroMod RP2040 Processor

SparkFun MicroMod RP2040 Processor

DEV-17720
$11.95

Required Materials

To follow along with this tutorial, you will need the following materials. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.

SparkFun MicroMod ATP Carrier Board

SparkFun MicroMod ATP Carrier Board

DEV-16885
$19.95
SparkFun Mini Screwdriver

SparkFun Mini Screwdriver

TOL-09146
$0.95
3
USB 3.1 Cable A to C - 3 Foot

USB 3.1 Cable A to C - 3 Foot

CAB-14743
$4.95
2
SparkFun MicroMod RP2040 Processor

SparkFun MicroMod RP2040 Processor

DEV-17720
$11.95

Suggested Reading

If you aren't familiar with the MicroMod ecosystem, we recommend reading here for an overview. We recommend reading here for an overview if you decide to take advantage of the Qwiic connector.

MicroMod LogoQwiic Connect System
MicroMod EcosystemQwiic Connect System

If you aren’t familiar with the following concepts, we also recommend checking out these tutorials before continuing.

Serial Communication

Asynchronous serial communication concepts: packets, signal levels, baud rates, UARTs and more!

Serial Peripheral Interface (SPI)

SPI is commonly used to connect microcontrollers to peripherals such as sensors, shift registers, and SD cards.

Pulse Width Modulation

An introduction to the concept of Pulse Width Modulation.

Logic Levels

Learn the difference between 3.3V and 5V devices and logic levels.

I2C

An introduction to I2C, one of the main embedded communications protocols in use today.

Analog vs. Digital

This tutorial covers the concept of analog and digital signals, as they relate to electronics.

Getting Started with MicroMod

Dive into the world of MicroMod - a compact interface to connect a microcontroller to various peripherals via the M.2 Connector!

Hardware Overview

M.2 Connector

All of our MicroMod Processor Boards come equipped with the M.2 MicroMod Connector, which leverages the M.2 standard and specification to allow you to install your MicroMod Processor Board on your choice of carrier board. Most of the pins use a common pinout to ensure cross platform compatibility.

M.2 Edge Connector Pins Highlighted

RP2040 Processor

The brains of the processor board is the Raspberry Pi Foundation's RP2040 ARM Cortex M0+ processor. An external 12MHz crystal is used as the clock for the RP2040. The RP2040 should be powered with 3.3V from a carrier board's M.2 connector. The logic levels for the I/O pins are 3.3V.

IC highlighted

Flash Memory

On the back of the board is the W25Q128JVPIM, which adds 128Mb (16MB) of flash memory externally.

flash memory highlighted

LED

A STAT LED is added to the top side of the board. This is useful debugging or as a status indicator. This is connected to GPIO25.

stat LED highlighted

MicroMod RP2040 Processor Pin Functionality

The complete pin map can be found in the table below.

Heads up! The pin table below and schematic both include the RP2040 pin associated with each MicroMod pin and this correlation can be used to identify alternate uses for pins on the RP2040 Processor Board. For many of the General Purpose I/O pins and other pins with multiple signal options, refer to your Carrier Board's Hookup Guide for information on how those pins are configured what they are used for. Not all pins are used on every Carrier Board.

Depending on your window size, you may need to use the horizontal scroll bar at the bottom of the table to view the additional pin functions. Note that the M.2 connector pins on opposing sides are offset from each other as indicated by the bottom pins where it says (Not Connected)*. There is no connection to pins that have a "-".

AUDIOUARTGPIO/BUSI2CSDIOSPIDedicated
Alternate
Function
Primary
Function
RP2040 GPIO PinBottom
Pin
   Top   
Pin
RP2040 GPIO Pin
Primary
Function
Alternate
Function
(Not Connected)*75GND
3.3V7473GPIO21
3.3V7271GPIO22
SPI_CS1SDIO_DATA3GPIO97069GPIO23
AUD_OUTSDIO_DATA2GPIO106867-
AUD_INSDIO_DATA1GPIO116665GPIO28G9
SDIO_DATA0SPI_CIPO1GPIO126463GPIO25G10
SDIO_CMDSPI_COPI1GPIO156261GPIO20SPI_CIPOG4
SDIO_SCKSPI_SCK1GPIO146059GPIO23SPI_COPIG7
AUD_MCLKPWM1GPIO245857GPIO22SPI_SCKG6
AUD_OUTSDIO_DAT2GPIO105655GPIO21SPI_CSG5
AUD_INSDIO_DAT1GPIO115453-
AUD_LRCLKCTS1GPIO25251-
AUD_BCLKUART_RTS1GPIO35049BATT_VIN
G4SPI_CIPOGPIO204847GPIO24PWM1AUD_MCLK
G3GPIO194645GND
G2GPIO184443-
G1GPIO174241-
G0GPIO164039GND
A1GPIO273837USBHOST_D-
GND3635USBHOST_D+
A0GPIO263433GND
PWM0GPIO133231Module Key
Module Key3029Module Key
Module Key2827Module Key
Module Key2625Module Key
Module Key2423SWDIO
I2C_INTUART_TX2GPIO82221SWDCK
SPI_CS1SDIO_DAT3UART_RX2GPIO92019GPIO1UART_RX1
D1GPIO71817GPIO0UART_TX1
TX2I2C_INTGPIO81615GPIO2UART_CTS1AUD_LRCLK
I2C_SCLGPIO51413GPIO3UART_RTS1AUD_BCLK
I2C_SDAGPIO41211BOOT
D0GPIO6109USB_VIN
-87GND
RESET65USB_D-
-43USB_D+
3.3V_IN21GND
FunctionBottom
Pin
   Top   
Pin
Function
(Not Connected)*75GND
3.3V7473G5 / BUS5
RTC_3V_BATT7271G6 / BUS6
SPI_CS1SDIO_DATA37069G7 / BUS7
SDIO_DATA26867G8
SDIO_DATA16665G9ADC_D- CAM_HSYNC
SPI_CIPO1SDIO_DATA06463G10ADC_D+CAM_VSYNC
SPI COPI1SDIO_CMD6261SPI_CIPO
SPI SCK1SDIO_SCK6059SPI_COPILED_DAT
AUD_MCLK5857SPI_SCKLED_CLK
CAM_MCLKPCM_OUTI2S_OUTAUD_OUT5655SPI_CS
CAM_PCLKPCM_INI2S_INAUD_IN5453I2C_SCL1
PDM_DATAPCM_SYNCI2S_WSAUD_LRCLK5251I2C_SDA1
PDM_CLKPCM_CLKI2S_SCKAUD_BCLK5049BATT_VIN / 3 (I - ADC) (0 to 3.3V)
G4 / BUS44847PWM1
G3 / BUS34645GND
G2 / BUS24443CAN_TX
G1 / BUS14241CAN_RX
G0 / BUS04039GND
A13837USBHOST_D-
GND3635USBHOST_D+
A03433GND
PWM03231Module Key
Module Key3029Module Key
Module Key2827Module Key
Module Key2625Module Key
Module Key2423SWDIO
UART_TX22221SWDCK
UART_RX22019UART_RX1
CAM_TRIGD11817UART_TX1
I2C_INT1615UART_CTS1
I2C_SCL1413UART_RTS1
I2C_SDA1211BOOT (Open Drain)
D0109USB_VIN
SWOG1187GND
RESET# (Open Drain)65USB_D-
3.3V_EN43USB_D+
3.3V21GND
Signal GroupSignalI/ODescriptionVoltage
Power3.3VI3.3V Source3.3V
GNDReturn current path0V
USB_VINIUSB VIN compliant to USB 2.0 specification. Connect to pins on processor board that require 5V for USB functionality4.8-5.2V
RTC_3V_BATTI3V provided by external coin cell or mini battery. Max draw=100μA. Connect to pins maintaining an RTC during power loss. Can be left NC.3V
3.3V_ENOControls the carrier board's main voltage regulator. Voltage above 1V will enable 3.3V power path.3.3V
BATT_VIN/3ICarrier board raw voltage over 3. 1/3 resistor divider is implemented on carrier board. Amplify the analog signal as needed for full 0-3.3V range3.3V
ResetResetIInput to processor. Open drain with pullup on processor board. Pulling low resets processor.3.3V
BootIInput to processor. Open drain with pullup on processor board. Pulling low puts processor into special boot mode. Can be left NC.3.3V
USBUSB_D±I/OUSB Data ±. Differential serial data interface compliant to USB 2.0 specification. If UART is required for programming, USB± must be routed to a USB-to-serial conversion IC on the processor board.
USB HostUSBHOST_D±I/OFor processors that support USB Host Mode. USB Data±. Differential serial data interface compliant to USB 2.0 specification. Can be left NC.
CANCAN_RXICAN Bus receive data.3.3V
CAN_TXO CAN Bus transmit data.3.3V
UARTUART_RX1IUART receive data.3.3V
UART_TX1OUART transmit data.3.3V
UART_RTS1OUART ready to send.3.3V
UART_CTS1IUART clear to send.3.3V
UART_RX2I2nd UART receive data.3.3V
UART_TX2O2nd UART transmit data.3.3V
I2CI2C_SCLI/OI2C clock. Open drain with pullup on carrier board.3.3V
I2C_SDAI/OI2C data. Open drain with pullup on carrier board3.3V
I2C_INT#IInterrupt notification from carrier board to processor. Open drain with pullup on carrier board. Active LOW3.3V
I2C_SCL1I/O2nd I2C clock. Open drain with pullup on carrier board.3.3V
I2C_SDA1I/O2nd I2C data. Open drain with pullup on carrier board.3.3V
SPISPI_COPIOSPI Controller Output/Peripheral Input.3.3V
SPI_CIPOISPI Controller Input/Peripheral Output.3.3V
SPI_SCKOSPI Clock.3.3V
SPI_CS#OSPI Chip Select. Active LOW. Can be routed to GPIO if hardware CS is unused.3.3V
SPI/SDIOSPI_SCK1/SDIO_CLKO2nd SPI Clock. Secondary use is SDIO Clock.3.3V
SPI_COPI1/SDIO_CMDI/O2nd SPI Controller Output/Peripheral Input. Secondary use is SDIO command interface.3.3V
SPI_CIPO1/SDIO_DATA0I/O2nd SPI Peripheral Input/Controller Output. Secondary use is SDIO data exchange bit 0.3.3V
SDIO_DATA1I/OSDIO data exchange bit 1.3.3V
SDIO_DATA2I/OSDIO data exchange bit 2.3.3V
SPI_CS1/SDIO_DATA3I/O2nd SPI Chip Select. Secondary use is SDIO data exchange bit 3.3.3V
AudioAUD_MCLKOAudio master clock.3.3V
AUD_OUT/PCM_OUT/I2S_OUT/CAM_MCLKOAudio data output. PCM synchronous data output. I2S serial data out. Camera master clock.3.3V
AUD_IN/PCM_IN/I2S_IN/CAM_PCLKIAudio data input. PCM syncrhonous data input. I2S serial data in. Camera periphperal clock.3.3V
AUD_LRCLK/PCM_SYNC/I2S_WS/PDM_DATAI/OAudio left/right clock. PCM syncrhonous data SYNC. I2S word select. PDM data.3.3V
AUD_BCLK/PCM_CLK/I2S_CLK/PDM_CLKOAudio bit clock. PCM clock. I2S continuous serial clock. PDM clock.3.3V
SWDSWDIOI/OSerial Wire Debug I/O. Connect if processor board supports SWD. Can be left NC.3.3V
SWDCKISerial Wire Debug clock. Connect if processor board supports SWD. Can be left NC.3.3V
ADCA0IAnalog to digital converter 0. Amplify the analog signal as needed to enable full 0-3.3V range.3.3V
A1IAnalog to digital converter 1. Amplify the analog signal as needed to enable full 0-3.3V range.3.3V
PWMPWM0OPulse width modulated output 0.3.3V
PWM1OPulse width modulated output 1.3.3V
DigitalD0I/O General digital input/output pin.3.3V
D1/CAM_TRIGI/OGeneral digital input/output pin. Camera trigger.3.3V
General/BusG0/BUS0I/OGeneral purpose pins. Any unused processor pins should be assigned to Gx with ADC + PWM capable pins given priority (0, 1, 2, etc.) positions. The intent is to guarantee PWM, ADC and Digital Pin functionality on respective ADC/PWM/Digital pins. Gx pins do not guarantee ADC/PWM function. Alternative use is pins can support a fast read/write 8-bit or 4-bit wide bus.3.3V
G1/BUS1I/O3.3V
G2/BUS2I/O3.3V
G3/BUS3I/O3.3V
G4/BUS4I/O3.3V
G5/BUS5I/O3.3V
G6/BUS6I/O3.3V
G7/BUS7I/O3.3V
G8I/OGeneral purpose pin3.3V
G9/ADC_D-/CAM_HSYNCI/ODifferential ADC input if available. Camera horizontal sync.3.3V
G10/ADC_D+/CAM_VSYNCI/ODifferential ADC input if available. Camera vertical sync.3.3V
G11/SWOI/OGeneral purpose pin. Serial Wire Output3.3V

Board Dimensions

The board takes advantage of the standard MicroMod form factor.

Board Dimensions

Hardware Assembly

If you have not already, make sure to check out the Getting Started with MicroMod: Hardware Hookup for information on inserting your Processor Board into your Carrier Board.

Getting Started with MicroMod

October 21, 2020

Dive into the world of MicroMod - a compact interface to connect a microcontroller to various peripherals via the M.2 Connector!

After inserting the MicroMod RP2040 processor board into a carrier board, your setup may look like the following.

MicroMod RP2040 Inserted Into a Carrier Board

Software

There are two methods of programming the RP2040. You can use MicroPython or C/C++ depending your personal preference. Stay tuned for more information!

Resources and Going Further

For more information, check out the resources below:


learn.sparkfun.com | CC BY-SA 3.0 | SparkFun Electronics | Niwot, Colorado


Viewing all articles
Browse latest Browse all 1123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>