RP2350 USB Motherboard
The board carries a directly mounted RP2350A, 16 MiB of flash and a 12 MHz crystal. It hosts up to four USB devices through the onboard hub. J2–J5 are the four device sockets. The included program lets a potentiometer select three drawings on a flex display.
Usage
Supply regulated 5 V and ground at the underside power pads. Slide POWER to ON on the same edge as J1. Switching it OFF powers down the processor, hub and all four device ports. The computer can still power the console interface. Connect a potentiometer and a flex display to any two of the four downstream ports. Turn the knob to select a circle, diagonal stripe or checkerboard. The controller starts on product power and runs with the computer unplugged.
Each downstream device has a 100 mA design budget. The example discovers USB CDC serial devices and supports the potentiometer and flex display. The distance sensor and contact-switch boards require additional host drivers.
Removable storage
Insert a microSD card from the front edge, immediately to the right of the power switch. With the board powered, send sd in the console to check that the motherboard can read the card's filesystem. FAT32 and exFAT are supported. The program and its USB drivers stay in the onboard flash. The example generates its three drawings and runs with the card removed. Playing files from the card requires application code.
Programming over SWD
- Connect the board's regulated 5 V product supply and switch POWER on.
- Connect the standard JST programmer to your computer. Use a straight-through five-wire JST SH cable from its five-pin port to J_SWD on the motherboard.
- Download the motherboard firmware ELF. With Raspberry Pi's RP2350-capable OpenOCD, run the following command from the download directory.
openocd -f interface/cmsis-dap.cfg -c "transport select swd" -c "adapter speed 1000" -f target/rp2350.cfg -c "program motherboard.elf verify reset exit"
J_SWD is a top-entry, five-pin JST SH connector on 1 mm pitch (BM05B-SRSS-TB). Contact 1 leaves programmer power isolated. Contacts 2 through 5 carry SWDIO, ground, SWCLK and active-low reset respectively. J1 remains available as the runtime console.
Protocol
Open the computer service port at 115200 baud. Send one ASCII command per line ending in LF.
| Command | Purpose | Reply |
|---|---|---|
id | Identify the controller. | DEVICE tscircuit motherboard 1.2.0 |
help | List commands. | One line of command names. |
devices | List the connected serial interfaces. | One PORT line per interface, followed by OK. |
status | Read the selected drawing. | SCENE 1, 2 or 3. Zero means the controller is waiting for a reading. |
sd | Read the removable card’s filesystem. | SD FAT32, SD exFAT or the detected FAT variant. A mount failure returns ERR sd <FatFs result number>. |
Mounting
The PCB is 76 × 46 × 1.6 mm. Four Ø2.2 mm holes accept M2 screws on a 70 × 40 mm grid. With the downstream USB ports at the top, the hole centres are X = 3 and 73 mm, Y = 3 and 43 mm from the lower-left corner.
The power lever projects 4.75 mm past the J1 edge and slides parallel to that edge. The assembled board is 50.75 mm deep including the lever. Allow 5.4 mm above the PCB for the tallest components and 1.9 mm below it for the switch leads, plus clearance for the power wires. Place the console USB-C cutout, power lever opening and microSD opening on the same enclosure face. Their centre lines are 27.5, 44 and 61.4 mm from the left PCB edge, respectively (the power dimension locates the switch body). The socket mouth sits 0.30 mm behind the PCB edge. Leave access above J_SWD for the programmer cable.
PCB fabrication
The board uses four copper layers. Inner layer 1 carries the ground plane. Top, inner layer 2 and bottom carry routed traces. All components mount on top. The tscircuit design checks pass, and the exported Gerber and drill files pass an independent check for open and shorted nets. The USB traces were routed individually. Differential impedance and USB operation still need verification on the chosen stackup and first article.