0
mirror of https://github.com/torvalds/GuitarPedal.git synced 2026-08-26 07:15:11 +00:00
Files
torvalds-GuitarPedal/Hardware/pedal/pedal.kicad_pcb
Linus Torvalds 2525e4db8a Create a new board version with 8MB PSRAM and dual stomp switches
This adds a 8MB of external memory to the RP2354.  It's worth noting
that such memory is much slower than the internal SRAM, so while the
intended use is very much for audio effects to store more audio state
(for a looper or a longer echo), it needs to be treated carefully.

The PSRAM _can_ be accessed as just regular memory, exactly the same way
the flash works (it's all using the same QSPI interface).

But the preferred model will be to use a DMA engine to move the data
asynchronously between the on-die SRAM and the off-chip PSRAM, so that
the audio engine running on core 1 will not see random delay states from
the QSPI accesses.

The second stomp switch is partly to make it easier to control any
looper interface, but partly because this pedal really did want two
stomp switches for controlling: you might use one for bypass, and the
other to switch between scenes.

A remote stomp obviously would also work, but let's make really basic
functionality available on the pedal directly.

Note that this will also require a new board file: the GPIO mappings
have changed to make the PCB routing simpler.  I wanted to use GPIO0 for
the new PSRAM QSPI chip select line, because it's right there in that
corner of the RP2354A chip.  But we used to use it for the stomp switch.

And once I changed one GPIO mapping, I might as well change the others,
since a board update is a board update, and the old routing was odd for
historical reasons, going all the way back to how the i2s lines went
over the BM28 connectors and the FFC cable.

So now the GPIO mappings are

 GPIO0: PSRAM QSPI CS1n (didn't exist before)
 GPIO8/9: MIDI UART TX/RX (used to be  20/21)
 GPIO10/19: STOMP 0/1 (used to be GPIO0 for STOMP0)
 GPIO11: WS2812B chain (used to be GPIO25)
 GPIO12..14: rotary encoder A/B/SW (stays the same)
 GPIO20..23: i2s DIN/DOUT/FSYNC/BCLK (used to be 10/11/9/8)

 ADC0/1: expression pedal Tip and Ring (used to be other way around)

Note the 2k2 pull-up resistor on GPIO0: the RP2354 initializes the
GPIO's to pull-down state at boot, and we need that PSRAM to be disabled
so that it does not interact with the internal flash of the RP2354.

Once booted, and programmed to be that chip select line, the reason for
the pull-up goes away and it only wastes power.  But the chip select is
pulled low only when actively accessing the PSRAM chip, so while
annoying, the peak 1.6mA current wasted there isn't very common.  I'd
have preferred using one of the 5k1 resistors I already have for the
USB-C connector, but I don't want to debug any QSPI issues.

It's not like this design is some kind of low-power battery design
anyway, but I'm adding that note here.

The Schottky diode that protects the rotary switch GPIO from seeing the
noise from the QSPI CS line was replaced with a BAT54 signal diode (half
of the dual diode package).  Higher speed - but higher V_f.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-08-17 21:06:43 -07:00

39858 lines
1.3 MiB