[Bounty] SparkFun MicroMod RP2040 Processor#246
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for the SparkFun MicroMod RP2040 Processor board, implementing a circuit definition with component specifications and comprehensive documentation for the RP2040-based processor module.
Changes:
- Added circuit implementation with RP2040 microcontroller, flash memory, USB-C connector, MicroMod M.2 connector, and supporting components
- Created export file for the board module
- Added detailed documentation with specifications, pin mappings, and usage examples
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 19 comments.
| File | Description |
|---|---|
| sparkfun-micromod-rp2040-processor.circuit.tsx | Circuit implementation defining all components (RP2040, flash, connectors, passives) with partial trace connections |
| index.tsx | Module export file using named export pattern |
| README.md | Comprehensive documentation with specifications, pin mappings, usage examples, and references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| export { default as SparkfunMicroModRP2040Processor } from "./sparkfun-micromod-rp2040-processor.circuit" No newline at end of file | |||
There was a problem hiding this comment.
The export statement uses a named export, but based on the pattern seen in other boards (like SparkFun-Atmospheric-Sensor-Breakout-BME280), the index file should use a default export instead of a named export.
| export { default as SparkfunMicroModRP2040Processor } from "./sparkfun-micromod-rp2040-processor.circuit" | |
| export { default } from "./sparkfun-micromod-rp2040-processor.circuit" |
| <trace from={`.${name}_led_resistor .pin2`} to={`.${name}_status_led .anode`} /> | ||
|
|
||
| {/* Reset button connections */} | ||
| <trace from={`.${name}_rp2040 .RUN`} to={`.${name}_reset_pullup .pin1`} /> | ||
| <trace from={`.${name}_reset_button .1`} to={`.${name}_rp2040 .RUN`} /> | ||
|
|
||
| {/* Boot button connections */} | ||
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | ||
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> |
There was a problem hiding this comment.
Missing ground connections for all components. There are no traces connecting GND pins of the RP2040, flash, crystal, USB connector, MicroMod connector, capacitors, LED, buttons, etc. to a common ground. This will result in a non-functional circuit.
| <trace from={`.${name}_led_resistor .pin2`} to={`.${name}_status_led .anode`} /> | |
| {/* Reset button connections */} | |
| <trace from={`.${name}_rp2040 .RUN`} to={`.${name}_reset_pullup .pin1`} /> | |
| <trace from={`.${name}_reset_button .1`} to={`.${name}_rp2040 .RUN`} /> | |
| {/* Boot button connections */} | |
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | |
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> | |
| <trace from={`.${name}_led_resistor .pin2`} to={`.${name}_status_led .anode`} /> | |
| {/* Tie LED cathode to common ground (RP2040 GND) */} | |
| <trace from={`.${name}_status_led .cathode`} to={`.${name}_rp2040 .GND`} /> | |
| {/* Reset button connections */} | |
| <trace from={`.${name}_rp2040 .RUN`} to={`.${name}_reset_pullup .pin1`} /> | |
| <trace from={`.${name}_reset_button .1`} to={`.${name}_rp2040 .RUN`} /> | |
| {/* Connect reset button return to ground */} | |
| <trace from={`.${name}_reset_button .2`} to={`.${name}_rp2040 .GND`} /> | |
| {/* Boot button connections */} | |
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | |
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> | |
| {/* Connect boot button return to ground */} | |
| <trace from={`.${name}_boot_button .2`} to={`.${name}_rp2040 .GND`} /> |
|
|
||
| {/* Crystal connections */} | ||
| <trace from={`.${name}_rp2040 .XIN`} to={`.${name}_crystal .X1`} /> | ||
| <trace from={`.${name}_rp2040 .XOUT`} to={`.${name}_crystal .X2`} /> |
There was a problem hiding this comment.
Crystal load capacitors are not connected to the crystal or ground. The capacitors xtal_cap1 and xtal_cap2 need to be connected between the crystal pins (X1/X2) and ground for proper oscillator operation.
| <trace from={`.${name}_rp2040 .XOUT`} to={`.${name}_crystal .X2`} /> | |
| <trace from={`.${name}_rp2040 .XOUT`} to={`.${name}_crystal .X2`} /> | |
| <trace from={`.${name}_crystal .X1`} to={`.${name}_xtal_cap1 .pin1`} /> | |
| <trace from={`.${name}_xtal_cap1 .pin2`} to=".GND" /> | |
| <trace from={`.${name}_crystal .X2`} to={`.${name}_xtal_cap2 .pin1`} /> | |
| <trace from={`.${name}_xtal_cap2 .pin2`} to=".GND" /> |
| <trace from={`.${name}_reset_button .1`} to={`.${name}_rp2040 .RUN`} /> | ||
|
|
||
| {/* Boot button connections */} | ||
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | ||
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> |
There was a problem hiding this comment.
Missing ground connections for buttons. The reset_button and boot_button need their opposite pins connected to ground to complete the button circuits.
| <trace from={`.${name}_reset_button .1`} to={`.${name}_rp2040 .RUN`} /> | |
| {/* Boot button connections */} | |
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | |
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> | |
| <trace from={`.${name}_reset_button .1`} to={`.${name}_rp2040 .RUN`} /> | |
| <trace from={`.${name}_reset_button .2`} to={`.${name}_rp2040 .GND`} /> | |
| {/* Boot button connections */} | |
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | |
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> | |
| <trace from={`.${name}_boot_button .2`} to={`.${name}_rp2040 .GND`} /> |
| ## Usage | ||
|
|
||
| ```tsx | ||
| import { SparkfunMicroModRP2040Processor } from "sparkfun-boards" |
There was a problem hiding this comment.
The import statement in the usage example uses "sparkfun-boards" but this doesn't match the actual package structure. The import should reference the correct package name based on how this repository is structured.
| import { SparkfunMicroModRP2040Processor } from "sparkfun-boards" | |
| import { SparkfunMicroModRP2040Processor } from "@tsci/sparkfun-boards/sparkfun-micromod-rp2040-processor" |
|
|
||
| {/* Boot button connections */} | ||
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_boot_pullup .pin1`} /> | ||
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> |
There was a problem hiding this comment.
Missing connections between RP2040 GPIOs and MicroMod connector pins. The implementation only shows the component definitions but doesn't trace the RP2040 GPIO pins to the corresponding MicroMod connector pins for peripherals like SPI, UART, I2C, analog inputs, and digital I/O as documented in the README.
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> | |
| <trace from={`.${name}_boot_button .1`} to={`.${name}_rp2040 .GPIO0`} /> | |
| {/* MicroMod connector signal connections */} | |
| {/* I2C bus */} | |
| <trace from={`.${name}_rp2040 .GPIO4`} to={`.${name}_micromod_connector .I2C_SCL`} /> | |
| <trace from={`.${name}_rp2040 .GPIO5`} to={`.${name}_micromod_connector .I2C_SDA`} /> | |
| {/* SPI bus */} | |
| <trace from={`.${name}_rp2040 .GPIO18`} to={`.${name}_micromod_connector .SPI_SCK`} /> | |
| <trace from={`.${name}_rp2040 .GPIO19`} to={`.${name}_micromod_connector .SPI_MOSI`} /> | |
| <trace from={`.${name}_rp2040 .GPIO16`} to={`.${name}_micromod_connector .SPI_MISO`} /> | |
| {/* Primary UART */} | |
| <trace from={`.${name}_rp2040 .GPIO0`} to={`.${name}_micromod_connector .UART_TX`} /> | |
| <trace from={`.${name}_rp2040 .GPIO1`} to={`.${name}_micromod_connector .UART_RX`} /> | |
| {/* Analog inputs */} | |
| <trace from={`.${name}_rp2040 .GPIO26`} to={`.${name}_micromod_connector .A0`} /> | |
| <trace from={`.${name}_rp2040 .GPIO27`} to={`.${name}_micromod_connector .A1`} /> | |
| <trace from={`.${name}_rp2040 .GPIO28`} to={`.${name}_micromod_connector .A2`} /> | |
| {/* General-purpose digital I/O */} | |
| <trace from={`.${name}_rp2040 .GPIO2`} to={`.${name}_micromod_connector .D0`} /> | |
| <trace from={`.${name}_rp2040 .GPIO3`} to={`.${name}_micromod_connector .D1`} /> |
| "5": "VOUT" | ||
| }} | ||
| /> | ||
|
|
There was a problem hiding this comment.
Missing connection for the voltage regulator's EN (enable) pin. The EN pin should be connected to either 3.3V (always on) or to a control signal for proper regulator operation.
| {/* Tie regulator EN to 3.3V output for always-on operation */} | |
| <net name={`${name}_regulator_en`}> | |
| <connection from={`${name}_regulator:EN`} /> | |
| <connection from={`${name}_regulator:VOUT`} /> | |
| </net> |
|
|
||
| {/* Status LED connections */} | ||
| <trace from={`.${name}_rp2040 .GPIO25`} to={`.${name}_led_resistor .pin1`} /> | ||
| <trace from={`.${name}_led_resistor .pin2`} to={`.${name}_status_led .anode`} /> |
There was a problem hiding this comment.
Missing connection from the LED cathode to ground. The status_led's cathode needs to be connected to ground for the LED circuit to be complete.
| <trace from={`.${name}_led_resistor .pin2`} to={`.${name}_status_led .anode`} /> | |
| <trace from={`.${name}_led_resistor .pin2`} to={`.${name}_status_led .anode`} /> | |
| <trace from={`.${name}_status_led .cathode`} to={`.${name}_gnd .1`} /> |
| <trace from={`.${name}_regulator .VOUT`} to={`.${name}_rp2040 .IOVDD`} /> | ||
| <trace from={`.${name}_regulator .VOUT`} to={`.${name}_rp2040 .DVDD`} /> | ||
| <trace from={`.${name}_regulator .VOUT`} to={`.${name}_rp2040 .ADC_AVDD`} /> | ||
| <trace from={`.${name}_regulator .VOUT`} to={`.${name}_rp2040 .USB_VDD`} /> |
There was a problem hiding this comment.
Missing connection to the RP2040's VREG_IN pin. Pin 44 (VREG_IN) should be connected to the USB VBUS (5V) or an appropriate power source for the internal voltage regulator to function.
| <trace from={`.${name}_regulator .VOUT`} to={`.${name}_rp2040 .USB_VDD`} /> | |
| <trace from={`.${name}_regulator .VOUT`} to={`.${name}_rp2040 .USB_VDD`} /> | |
| <trace from={`.${name}_usb_connector .VBUS1`} to={`.${name}_rp2040 .VREG_IN`} /> |
| | UART1_RTS | 27 | GPIO10 | UART1 Request To Send | | ||
| | UART1_CTS | 26 | GPIO11 | UART1 Clear To Send | | ||
| | I2C_SCL | 21 | GPIO13 | I2C Clock | | ||
| | I2C_SDA | 22 | GPIO12 | I2C Data | |
There was a problem hiding this comment.
The pin mapping table in the README shows I2C_SDA on pin 22, but the circuit file has "I2C1_SDA" for that pin. These should be consistent. Based on the MicroMod standard, pin 22 should be I2C_SDA (primary I2C interface).
Summary
This PR addresses the bounty issue #175.
Changes Made
Related Issue
Closes #175