raspberry_pi_RP2040 module#
Raspberry Pi RP2040 Microcontroller
Component definition for the Raspberry Pi RP2040 dual-core ARM Cortex-M0+ microcontroller. Includes symbol, component, and circuit definitions with complete peripheral support.
- class RP2040_Symbol[source]#
Bases:
SymbolSchematic symbol for the RP2040 microcontroller
- pin_name_size: float | None = 0.58#
Font size of pin name text of
Pinobjects in this symbol, in grid units. If unset, defers to a parentSymbol, if a parent exists. This can be overriden at thePinlevel by setting itspin_name_sizeattribute.
- pad_name_size: float | None = 0.58#
Font size of pad name text of
Pinobjects in this symbol, in grid units. If unset, defers to a parentSymbol, if a parent exists. This can be overriden at thePinlevel by setting itspad_name_sizeattribute.
- IOVDD5 = Pin(at=(3, 15), direction=<Direction.Up: 'up'>, length=1)#
- IOVDD4 = Pin(at=(2, 15), direction=<Direction.Up: 'up'>, length=1)#
- IOVDD3 = Pin(at=(1, 15), direction=<Direction.Up: 'up'>, length=1)#
- IOVDD2 = Pin(at=(0, 15), direction=<Direction.Up: 'up'>, length=1)#
- IOVDD1 = Pin(at=(-1, 15), direction=<Direction.Up: 'up'>, length=1)#
- IOVDD0 = Pin(at=(-2, 15), direction=<Direction.Up: 'up'>, length=1)#
- ADC_AVDD = Pin(at=(6, 15), direction=<Direction.Up: 'up'>, length=1)#
- VREG_IN = Pin(at=(-4, 15), direction=<Direction.Up: 'up'>, length=1)#
- VREG_VOUT = Pin(at=(-5, 15), direction=<Direction.Up: 'up'>, length=1)#
- USB_VDD = Pin(at=(5, 15), direction=<Direction.Up: 'up'>, length=1)#
- DVDD1 = Pin(at=(-7, 15), direction=<Direction.Up: 'up'>, length=1)#
- DVDD0 = Pin(at=(-8, 15), direction=<Direction.Up: 'up'>, length=1)#
- GPIO0 = Pin(at=(11, 9), direction=<Direction.Right: 'right'>, length=1)#
- GPIO1 = Pin(at=(11, 8), direction=<Direction.Right: 'right'>, length=1)#
- GPIO2 = Pin(at=(11, 7), direction=<Direction.Right: 'right'>, length=1)#
- GPIO3 = Pin(at=(11, 6), direction=<Direction.Right: 'right'>, length=1)#
- GPIO4 = Pin(at=(11, 5), direction=<Direction.Right: 'right'>, length=1)#
- GPIO5 = Pin(at=(11, 4), direction=<Direction.Right: 'right'>, length=1)#
- GPIO6 = Pin(at=(11, 3), direction=<Direction.Right: 'right'>, length=1)#
- GPIO7 = Pin(at=(11, 2), direction=<Direction.Right: 'right'>, length=1)#
- GPIO8 = Pin(at=(11, 1), direction=<Direction.Right: 'right'>, length=1)#
- GPIO9 = Pin(at=(11, 0), direction=<Direction.Right: 'right'>, length=1)#
- GPIO10 = Pin(at=(11, -1), direction=<Direction.Right: 'right'>, length=1)#
- GPIO11 = Pin(at=(11, -2), direction=<Direction.Right: 'right'>, length=1)#
- GPIO12 = Pin(at=(11, -3), direction=<Direction.Right: 'right'>, length=1)#
- GPIO13 = Pin(at=(11, -4), direction=<Direction.Right: 'right'>, length=1)#
- GPIO14 = Pin(at=(11, -5), direction=<Direction.Right: 'right'>, length=1)#
- GPIO15 = Pin(at=(11, -6), direction=<Direction.Right: 'right'>, length=1)#
- GPIO16 = Pin(at=(11, -7), direction=<Direction.Right: 'right'>, length=1)#
- GPIO17 = Pin(at=(11, -8), direction=<Direction.Right: 'right'>, length=1)#
- GPIO18 = Pin(at=(11, -9), direction=<Direction.Right: 'right'>, length=1)#
- GPIO19 = Pin(at=(11, -10), direction=<Direction.Right: 'right'>, length=1)#
- GPIO20 = Pin(at=(11, -11), direction=<Direction.Right: 'right'>, length=1)#
- GPIO21 = Pin(at=(11, -12), direction=<Direction.Right: 'right'>, length=1)#
- GPIO22 = Pin(at=(11, -13), direction=<Direction.Right: 'right'>, length=1)#
- GPIO23 = Pin(at=(11, -14), direction=<Direction.Right: 'right'>, length=1)#
- GPIO24 = Pin(at=(11, -15), direction=<Direction.Right: 'right'>, length=1)#
- GPIO25 = Pin(at=(11, -16), direction=<Direction.Right: 'right'>, length=1)#
- GPIO26_ADC0 = Pin(at=(11, -18), direction=<Direction.Right: 'right'>, length=1)#
- GPIO27_ADC1 = Pin(at=(11, -19), direction=<Direction.Right: 'right'>, length=1)#
- GPIO28_ADC2 = Pin(at=(11, -20), direction=<Direction.Right: 'right'>, length=1)#
- GPIO29_ADC3 = Pin(at=(11, -21), direction=<Direction.Right: 'right'>, length=1)#
- TESTEN = Pin(at=(-5, -23), direction=<Direction.Down: 'down'>, length=1)#
- XIN = Pin(at=(-11, -5), direction=<Direction.Left: 'left'>, length=1)#
- XOUT = Pin(at=(-11, -7), direction=<Direction.Left: 'left'>, length=1)#
- SWCLK = Pin(at=(-11, -16), direction=<Direction.Left: 'left'>, length=1)#
- SWD = Pin(at=(-11, -17), direction=<Direction.Left: 'left'>, length=1)#
- RUN = Pin(at=(-11, -12), direction=<Direction.Left: 'left'>, length=1)#
- USB_DM = Pin(at=(11, 12), direction=<Direction.Right: 'right'>, length=1)#
- USB_DP = Pin(at=(11, 13), direction=<Direction.Right: 'right'>, length=1)#
- QSPI_SD3 = Pin(at=(-11, 4), direction=<Direction.Left: 'left'>, length=1)#
- QSPI_SCLK = Pin(at=(-11, 2), direction=<Direction.Left: 'left'>, length=1)#
- QSPI_SD0 = Pin(at=(-11, 7), direction=<Direction.Left: 'left'>, length=1)#
- QSPI_SD2 = Pin(at=(-11, 5), direction=<Direction.Left: 'left'>, length=1)#
- QSPI_SD1 = Pin(at=(-11, 6), direction=<Direction.Left: 'left'>, length=1)#
- QSPI_SS = Pin(at=(-11, 8), direction=<Direction.Left: 'left'>, length=1)#
- GND = Pin(at=(0, -23), direction=<Direction.Down: 'down'>, length=1)#
- ref_text = Shape[Text]#
- value_text = Shape[Text]#
- component_box = Polygon(elements=[(11.0, 15.0), (-11.0, 15.0), (-11.0, -23.0), (11.0, -23.0), (11.0, 15.0)], holes=())#
- raspberry_pi_text = Shape[Text]#
- rp2040_text = Shape[Text]#
- class RP2040Component[source]#
Bases:
ComponentRaspberry Pi RP2040 microcontroller component
- mpn: str | None = 'RP2040'#
Manufacturer part number for this component.
- reference_designator_prefix: str | None = 'U'#
Reference designator prefix for this component. This will be used to generate a unique reference designator for each component of the same type.
Note
This field is a required data point for matching components between builds. If this value changes (including changing from unset to set), it will be treated as a new component, even if nothing else changes.
- IOVDD = [Port(), Port(), Port(), Port(), Port(), Port()]#
I/O supply voltage pins (3.3V nominal)
- ADC_AVDD = Port()#
ADC analog supply voltage
- VREG_IN = Port()#
Voltage regulator input (1.8V-3.6V)
- VREG_VOUT = Port()#
Voltage regulator output (1.1V nominal)
- USB_VDD = Port()#
USB supply voltage
- DVDD = [Port(), Port()]#
Digital core supply voltage
- GPIO = [Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port(), Port()]#
General purpose I/O pins (GPIO0-GPIO29)
- TESTEN = Port()#
Test enable pin
- XIN = Port()#
Crystal oscillator input
- XOUT = Port()#
Crystal oscillator output
- SWCLK = Port()#
Serial wire debug clock
- SWD = Port()#
Serial wire debug data
- RUN = Port()#
Reset/run control pin
- USB_DM = Port()#
USB data minus
- USB_DP = Port()#
USB data plus
- QSPI_SD3 = Port()#
QSPI data line 3
- QSPI_SCLK = Port()#
QSPI serial clock
- QSPI_SD0 = Port()#
QSPI data line 0 (MOSI)
- QSPI_SD2 = Port()#
QSPI data line 2
- QSPI_SD1 = Port()#
QSPI data line 1 (MISO)
- QSPI_SS = Port()#
QSPI slave select
- GND = Port()#
Ground connection
- landpattern = QFN(num_leads=56).lead_profile(LeadProfile(span=Toleranced(7, 0, 0), pitch=0.4, type=QFNLead(length=Toleranced(0.4, 0.1, 0.1), width=Toleranced(0.18, 0.05, 0.05), lead_type=LeadProtrusion(name='QuadFlatNoLeads', fillets={<DensityLevel.A: 'A'>: LeadFillets(toe=0.4, heel=0.0, side=-0.04, courtyard_excess=0.5), <DensityLevel.B: 'B'>: LeadFillets(toe=0.3, heel=0.0, side=-0.04, courtyard_excess=0.25), <DensityLevel.C: 'C'>: LeadFillets(toe=0.2, heel=0.0, side=-0.04, courtyard_excess=0.1)})))).package_body(RectanglePackage(height=Toleranced(0.9, 0, 0), width=Toleranced(7, 0, 0), length=Toleranced(7, 0, 0))).thermal_pad(Polygon(elements=((1.55, 1.55), (-1.55, 1.55), (-1.55, -1.55), (1.55, -1.55)), holes=())).density_level(<DensityLevel.C: 'C'>)#
- symbol = RP2040_Symbol()#
- class RP2040[source]#
Bases:
CircuitComplete RP2040 microcontroller circuit with supporting components
Includes the RP2040 MCU, crystal oscillator, flash memory, power regulation, bypass capacitors, and boot/reset buttons.
Provides GPIO, I2C, SPI(cs=True), USB2(), and ADC interfaces. Use require to access IO.
- power = Power()#
Main power supply interface
- usb = USB2()#
USB 2.0 interface
- self_provide_gpio = PrePostInit#
- self_provide_timer = PrePostInit#
- self_provide_i2c0_sda = PrePostInit#
- self_provide_i2c0_scl = PrePostInit#
- self_provide_i2c1_sda = PrePostInit#
- self_provide_i2c1_scl = PrePostInit#
- self_provide_spi0_rx = PrePostInit#
- self_provide_spi0_csn = PrePostInit#
- self_provide_spi0_sck = PrePostInit#
- self_provide_spi0_tx = PrePostInit#
- self_provide_spi1_rx = PrePostInit#
- self_provide_spi1_csn = PrePostInit#
- self_provide_spi1_sck = PrePostInit#
- self_provide_spi1_tx = PrePostInit#
- self_provide_uart0_rx = PrePostInit#
- self_provide_uart0_tx = PrePostInit#
- self_provide_uart0_cts = PrePostInit#
- self_provide_uart0_rts = PrePostInit#
- self_provide_uart1_rx = PrePostInit#
- self_provide_uart1_tx = PrePostInit#
- self_provide_uart1_cts = PrePostInit#
- self_provide_uart1_rts = PrePostInit#
- provide_i2c0 = PrePostInit#
- provide_i2c1 = PrePostInit#
- provide_spi0 = PrePostInit#
- provide_spi1 = PrePostInit#
- provide_uart0 = PrePostInit#
- provide_uart1 = PrePostInit#
- self_provide_adc = PrePostInit#
- datasheet = 'https://datasheet.lcsc.com/lcsc/2201101600_Raspberry-Pi-RP2040_C2040.pdf'#