Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
133 changes: 80 additions & 53 deletions lib/Microcontroller_RP2040/Microcontroller_RP2040.circuit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ const adcRefLabel = {
displayName: "ADC_REF",
schDisplayLabel: "ADC_REF",
} as const
// Keep every functional subset attached to one of the four visible sections so
// section bounds and dividers account for all schematic components.
const schSections = {
rp2040: (name: string) => `${name}__rp2040`,
usb: (name: string) => `${name}__usb`,
power: (name: string) => `${name}__power`,
flash: (name: string) => `${name}__flash`,
power: (name: string) => `${name}__rp2040`,
flash: (name: string) => `${name}__usb`,
clock: (name: string) => `${name}__clock`,
controls: (name: string) => `${name}__controls`,
display: (name: string) => `${name}__display`,
controls: (name: string) => `${name}__status`,
display: (name: string) => `${name}__status`,
status: (name: string) => `${name}__status`,
debug: (name: string) => `${name}__debug`,
debug: (name: string) => `${name}__status`,
} as const

export type MicrocontrollerRP2040Props = Omit<
Expand Down Expand Up @@ -73,9 +75,9 @@ export const Microcontroller_RP2040 = ({
pcbX={-2}
pcbY={21}
pcbRotation={90}
schX={7.8}
schY={-4.6}
schRotation={180}
schX={3}
schY={-5.8}
schRotation={90}
/>
<trace name="VBUS_D" from="net.VBUS" to=".D_VBUS > .anode" {...vbusLabel} />
<trace
Expand All @@ -93,9 +95,9 @@ export const Microcontroller_RP2040 = ({
pcbX={-4.7}
pcbY={17.3}
pcbRotation={90}
schOrientation="horizontal"
schX={9.4}
schY={-4.6}
schX={3}
schY={-7}
schRotation={270}
/>

<trace
Expand Down Expand Up @@ -212,8 +214,9 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.controls(name)}
pcbX={10.4}
pcbY={-5.5}
schX={12.5}
schY={-11}
schX={12.8}
schY={-13.5}
schRotation={90}
/>

<capacitor
Expand All @@ -225,6 +228,8 @@ export const Microcontroller_RP2040 = ({
pcbX={-5.5}
pcbY={10.8}
pcbRotation={180}
schX={16.8}
schY={-1.7}
/>

<capacitor
Expand All @@ -235,6 +240,8 @@ export const Microcontroller_RP2040 = ({
schOrientation="vertical"
pcbX={7.2}
pcbY={14.5}
schX={7.2}
schY={-2.2}
/>

<capacitor
Expand All @@ -245,6 +252,8 @@ export const Microcontroller_RP2040 = ({
schOrientation="vertical"
pcbX={8}
pcbY={-4.4}
schX={1.3}
schY={-9.2}
/>
{/* RUN pullup */}
<trace
Expand Down Expand Up @@ -308,9 +317,9 @@ export const Microcontroller_RP2040 = ({
pcbX={0}
pcbY={31.0}
pcbRotation={180}
schX={12.25}
schY={-5.8}
schWidth={2.15}
schX={10.5}
schY={-5.3}
schWidth={2.6}
schHeight={1.8}
schPinArrangement={{
leftSide: [13, 15, 17, 18, 20, 22, 23, 25],
Expand All @@ -336,9 +345,9 @@ export const Microcontroller_RP2040 = ({
pcbX={3.4}
pcbY={9.5}
pcbRotation={90}
schX={17.5}
schY={-4.16}
schHeight={1.6}
schX={17}
schY={-4}
schHeight={2}
schPinArrangement={{
leftSide: [8, 1, 2, 3, 5, 6, 7, 4, 9],
}}
Expand All @@ -349,8 +358,8 @@ export const Microcontroller_RP2040 = ({
pcbX={-7.2}
pcbY={20.2}
pcbRotation={180}
schX={8.8}
schY={-6.3}
schX={1.3}
schY={-7.8}
schHeight={0.6}
/>

Expand All @@ -359,25 +368,25 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.clock(name)}
pcbX={-0.5}
pcbY={-6}
schX={1.025}
schX={1.2}
schY={-12.5}
/>
<SKRPACE010
name="SW_BOOT"
schSectionName={schSections.controls(name)}
pcbX={8.6}
pcbY={21.8}
schX={10.6}
schY={-9.4}
schX={8.6}
schY={-12}
/>
<SKRPACE010
name="SW_RUN"
schSectionName={schSections.controls(name)}
pcbX={5.5}
pcbY={-12.5}
pcbRotation={90}
schX={12.5}
schY={-9.4}
schX={12.8}
schY={-12}
/>
<XL_1608SURC_06
name="D1"
Expand All @@ -386,8 +395,9 @@ export const Microcontroller_RP2040 = ({
pcbX={10}
pcbY={4.2}
pcbRotation={90}
schX={9.66}
schY={-12}
schX={10.4}
schY={-13.2}
schRotation={270}
/>
<XL_1608SURC_06
name="D_PWR"
Expand All @@ -396,8 +406,9 @@ export const Microcontroller_RP2040 = ({
pcbX={-9.8}
pcbY={24.8}
pcbRotation={90}
schX={10.2}
schY={-13.8}
schX={14.5}
schY={-13.4}
schRotation={270}
/>

<resistor
Expand All @@ -408,8 +419,9 @@ export const Microcontroller_RP2040 = ({
pcbX={12}
pcbY={17.8}
pcbRotation={90}
schX={10.6}
schY={-11}
schX={8.6}
schY={-13.5}
schRotation={90}
/>
<resistor
name="R_LED"
Expand All @@ -419,8 +431,9 @@ export const Microcontroller_RP2040 = ({
pcbX={7.2}
pcbY={1.2}
pcbRotation={90}
schX={8.06}
schY={-12}
schX={10.4}
schY={-12.2}
schRotation={270}
/>
<resistor
name="R_PWR_LED"
Expand All @@ -430,9 +443,9 @@ export const Microcontroller_RP2040 = ({
pcbX={-6.2}
pcbY={24.8}
pcbRotation={90}
schOrientation="horizontal"
schX={8.6}
schY={-13.8}
schX={14.5}
schY={-12.2}
schRotation={270}
/>
<resistor
name="R_CC1"
Expand All @@ -441,8 +454,9 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.usb(name)}
pcbX={-0.2}
pcbY={25.6}
schX={8.89}
schY={-7.36}
schX={7.2}
schY={-7.5}
schRotation={270}
/>
<resistor
name="R_CC2"
Expand All @@ -451,6 +465,9 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.usb(name)}
pcbX={3.6}
pcbY={26.5}
schX={14.8}
schY={-6.5}
schRotation={270}
/>
<resistor
name="R_USB1"
Expand All @@ -460,8 +477,8 @@ export const Microcontroller_RP2040 = ({
pcbX={3.4}
pcbY={22.5}
pcbRotation={90}
schX={15.3}
schY={-6.1}
schX={13.3}
schY={-7.7}
/>
<resistor
name="R_USB2"
Expand All @@ -471,8 +488,8 @@ export const Microcontroller_RP2040 = ({
pcbX={2.4}
pcbY={16.5}
pcbRotation={-90}
schX={14.96}
schY={-8.08}
schX={13.3}
schY={-6.6}
/>

<capacitor
Expand All @@ -484,6 +501,8 @@ export const Microcontroller_RP2040 = ({
pcbX={-2.8}
pcbY={26.3}
pcbRotation={90}
schX={9}
schY={-2.2}
/>
<capacitor
name="C_3V3"
Expand All @@ -493,6 +512,8 @@ export const Microcontroller_RP2040 = ({
schOrientation="vertical"
pcbX={-8.5}
pcbY={4.2}
schX={4.1}
schY={-7.8}
/>
<capacitor
name="C_CORE"
Expand All @@ -513,6 +534,8 @@ export const Microcontroller_RP2040 = ({
schOrientation="vertical"
pcbX={9.8}
pcbY={18.4}
schX={10.8}
schY={-2.2}
/>
<capacitor
name="C_XIN"
Expand All @@ -522,6 +545,8 @@ export const Microcontroller_RP2040 = ({
schOrientation="vertical"
pcbX={-8.4}
pcbY={-11.8}
schX={0.4}
schY={-14.2}
/>
<capacitor
name="C_XOUT"
Expand All @@ -531,6 +556,8 @@ export const Microcontroller_RP2040 = ({
schOrientation="vertical"
pcbX={-2.4}
pcbY={-21}
schX={2.2}
schY={-14.2}
/>
<inductor
name="L_AVDD"
Expand All @@ -541,8 +568,8 @@ export const Microcontroller_RP2040 = ({
pcbY={-1.8}
supplierPartNumbers={{ jlcpcb: ["C1002"] }}
pcbRotation={90}
schX={6.8}
schY={-8.3}
schX={3.7}
schY={-9.2}
/>

<testpoint
Expand All @@ -553,8 +580,8 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.debug(name)}
pcbX={-6}
pcbY={-31}
schX={6}
schY={-15.5}
schX={8.6}
schY={-16.5}
/>
<testpoint
name="TP_GND"
Expand All @@ -564,8 +591,8 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.debug(name)}
pcbX={-2}
pcbY={-31}
schX={7.5}
schY={-15.5}
schX={10.4}
schY={-16.5}
/>
<testpoint
name="TP_SWDIO"
Expand All @@ -575,8 +602,8 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.debug(name)}
pcbX={2}
pcbY={-31}
schX={9}
schY={-15.5}
schX={12.2}
schY={-16.5}
/>
<testpoint
name="TP_3V3"
Expand All @@ -586,8 +613,8 @@ export const Microcontroller_RP2040 = ({
schSectionName={schSections.debug(name)}
pcbX={6}
pcbY={-31}
schX={10.5}
schY={-15.5}
schX={14}
schY={-16.5}
/>

<trace
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading