Skip to content

Commit d1f9bce

Browse files
Document the Generic RP2040 option (#546)
Fixes #522
1 parent 6709574 commit d1f9bce

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/ide.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,40 @@ Debug messages from `printf` and the Core can be printed to a Serial port
3434
to allow for easier debugging. Select the desired port and verbosity.
3535
Selecting a port for debug output does not stop a sketch from using it
3636
for normal operations.
37+
38+
Generic RP2040 Support
39+
----------------------
40+
If your RP2040 board isn't in the menus you can still use it with the
41+
IDE bu using the `Board->Generic RP2040` menu option. You will need to
42+
then set the flash size (see above) and tell the IDE how to communicate
43+
with the flash chip using the `Tools->Boot Stage 2` menu.
44+
45+
Boot Stage 2 Options for Generic RP2040
46+
---------------------------------------
47+
The Arduino Pico needs to set up its internal flash interface to talk to
48+
whatever flash chip is in the system. While all flash chips support a
49+
basic (and slow) 1-bit operation using common timings, each different
50+
brand (and sometimes model) of flash chip require custom timings to work
51+
in QSPI (4-bit) mode. The `Boot Stage 2` menu lets you select from
52+
the supported timings.
53+
54+
The options with `/2` in them divide the system clock by 2 to drive the
55+
bus. Options with `/4` divide the clock by 4 and so are slower but more
56+
compatible.
57+
58+
If you can't match a chip name in the menu to your flash chip, a simple
59+
test can be run to determine which is correct. Simpily load the `Blink`
60+
example, select the first option in the `Boot Stage 2` menu, and upload.
61+
If that works, note it and continue. Iterate through the options and
62+
note which ones work. If an option doesn't work, unplug the chip and
63+
hold the BOOTSEL button down while re-inserting it to enter the ROM
64+
uploader mode. (The CPU and flash will not be harmed if the test fails.)
65+
66+
If one of the custom bootloaders (not `Generic SPI /2 or /4`) worked, use
67+
that option to get best performance. If none worked other than the
68+
`Generic SPI /2 or /4` then use that. The `/2` options of all models
69+
is preferred as it is faster, but some boards do require `/4` on the
70+
custom chip interfaces.
71+
72+
When in doubt, `Generic SPI /4` should work with any flash chip but is
73+
slow.

0 commit comments

Comments
 (0)