You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-5Lines changed: 31 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,17 @@ This firmware turns pins 0-15 into programmable digital outputs. Their states ar
6
6
7
7
Pin 20 is reserved for optional external clock input.
8
8
9
+
## Supported boards
10
+
11
+
We support either the official [Raspberry Pi Pico (RP2040 chip)](https://www.raspberrypi.com/products/raspberry-pi-pico/) board or the official [Raspberry Pi Pico 2 (RP2350 chip)](https://www.raspberrypi.com/products/raspberry-pi-pico-2/) board.
12
+
We recommend the Pico 2 (RP2350) board due to its faster clock and larger RAM.
13
+
14
+
> [!CAUTION]
15
+
> The RP2350 currently has a hardware design bug that impacts the operation of the internal pull-down resistor on GPIO pins configured as inputs.
16
+
> This may impact the operation of the PrawnBlaster trigger inputs when using the RP2350, depending on the specs of your trigger. For full details, see errata E9 in the [RP2350 datasheet](https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf).
17
+
> The issue can usually be fixed by providing a suitably sized external pull-down resistor on the relevant input pins.
18
+
> RP2040 based boards do not suffer from this issue (but have reduced timing and storage compared to the RP2350).
19
+
9
20
## Specs
10
21
11
22
All timings are given relative to the default system clock of 100 MHz.
@@ -14,12 +25,21 @@ All timings are given relative to the default system clock of 100 MHz.
14
25
***Minimum Pulse Width**: 5 clock cycles (50 ns)
15
26
***Max Pulse Rate**: 1/10 system clock frequency (10 MHz)
* Max system clock frequency of 150 MHz (Pico 2 - RP2350) or 133 MHz (Pico - RP2040)
31
+
* Support for referencing the system clock to an external clock source to synchronise with other devices (officially limited to 50MHz on the Pico and Pico 2, but testing has shown it works up to 133MHz).
20
32
21
33
## Installing the .uf2 file
22
-
Before plugging in usb, hold down the bootsel button, which should pop-up a window to drag/drop the .uf2 file into, and when that .uf2 file is added, the window should disappear.
On your Raspberry Pi Pico, hold down the "bootsel" button while plugging the Pico into USB port on a PC (that must already be turned on).
39
+
The Pico should mount as a mass storage device (if it doesn't, try again or consult the Pico documentation).
40
+
Drag and drop the `.uf2` file into the mounted mass storage device.
41
+
The mass storage device should unmount after the copy completes.
42
+
Your Pico is now running the Prawn Digital Output firmware!
23
43
24
44
## Serial Communication
25
45
Commands must end with a newline character: `'\n'`.
@@ -43,6 +63,7 @@ These commands can be run at any time (ie during sequence execution).
43
63
*`deb` - Turns on debugging mode which adds printed output when adding instructions. By default, debugging is off.
44
64
*`ndb` - Turns off debugging mode.
45
65
*`ver` - Displays the version of the PrawnDO code.
66
+
*`brd` - Responds with a string containing the board version (`pico1` or `pico2`).
46
67
*`abt` - Abort execution of a running sequence.
47
68
48
69
These commands must be run when the running status is `STOPPED`.
@@ -79,7 +100,7 @@ These commands must be run when the running status is `STOPPED`.
79
100
*`len` - Print total number of instructions in the programmed sequence.
80
101
*`cls` - Clear the current sequence of programmed outputs.
81
102
82
-
*`clk <src (0: internal, 1: external)> <freq (in decimal Hz)>` - Sets the system clock and frequency. Maximum frequency allowed is 133 MHz. Default is 100 MHz internal clock. External clock frequency input is GPIO pin 20.
103
+
*`clk <src (0: internal, 1: external)> <freq (in decimal Hz)>` - Sets the system clock and frequency. Maximum frequency allowed is 150 MHz (Pico 2 - RP2350) or 133 MHz (Pico - RP2040). Default is 100 MHz internal clock. External clock frequency input is GPIO pin 20.
83
104
*`frq` - Measure and print system frequencies.
84
105
*`prg` - Equivalent to disconnecting the Pico, holding down the "bootsel" button, and reconnecting the Pico. Places the Pico into firmware flashing mode; the PrawnDO serial port should disappear and the Pico should mount as a mass storage device.
85
106
@@ -140,7 +161,7 @@ If you want to make changes to the firmware, or want to compile it yourself (bec
140
161
2. Clone this repository
141
162
3. Open a terminal with the current working directory set to the repository root (the `docker-compose.yaml`` file should be there)
142
163
4. Run `docker compose build --pull` to build the docker container
143
-
5. Run `docker compose up` to build the PrawnBlaster firmware.
164
+
5. Run `docker compose up` to build the PrawnDO firmware.
144
165
145
166
Step 4 will take a while as it has to build the docker container.
146
167
If it is slow to download packages from the Ubuntu package repositories, consider providing an explicit apt mirror that is fast for you: `docker compose build --pull --build-arg APT_MIRROR="http://azure.archive.ubuntu.com/ubuntu/"`.
@@ -151,3 +172,8 @@ Just change the git tag of the pico SDK that gets cloned out by git, then rebuil
151
172
Note once the docker container is built, you can run step 5 as many times as you like.
152
173
You do not need to rebuild the container, even if you make changes to the source code.
153
174
You only need to rebuild the docker container if you modify the `build/docker/Dockerfile` file.
175
+
176
+
By default, running `docker compose up` builds the all variations of the firmware.
177
+
If you only want to build for a specific board, run either `docker compose up build_rp2040_firmware` or `docker compose up build_rp2350_firmware`.
178
+
179
+
The firmware will be located in `build_rp2xxx/prawn_do/prawn_do_rp2xxx.uf2` where `rp2xxx` will be either `rp2040` or `rp2350`.
# Pass in board type to firmware as a compiler definition. Note that PICO_BOARD is passed in by the SDK, but it's passed in a string which isn't valid and so I can't use it...
27
+
# This is also, to some extent, a duplicate of the above PRAWNDO_NUM_INSTRUCTIONS but I think it makes sense to keep these seperate.
0 commit comments