Skip to content

Commit 4c7b3e9

Browse files
committed
boards/rpi-pico-2: unify doc.md into one singular doc.md
1 parent da50d65 commit 4c7b3e9

File tree

2 files changed

+28
-116
lines changed

2 files changed

+28
-116
lines changed

boards/rpi-pico-2-arm/doc.md

Lines changed: 2 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,5 @@
1-
@defgroup boards_rpi_pico_2 Raspberry Pi Pico 2
1+
@defgroup boards_rpi_pico_2_arm Raspberry Pi Pico 2
22
@ingroup boards
33
@brief Support for the RP2350 based Raspberry Pi Pico board
44

5-
@warning The support for the Raspberry Pi Pico 2 is still in a very early stage!
6-
See [Known Issues](#rpi_pico_2_known_issues).
7-
8-
## Overview
9-
10-
The Raspberry Pi Pico 2 is a microcontroller board based on the RP2350 chip,
11-
featuring dual-core Arm Cortex-M0+ processors and RISC-V Hazard secondary
12-
architecture. It is designed for a wide range of applications,
13-
from hobbyist projects to professional embedded systems
14-
for a fairly affordable price.
15-
16-
![The Raspberry Pi Pico 2 Board](https://www.raspberrypi.com/documentation/microcontrollers/images/pico-2.png)
17-
18-
## Hardware
19-
20-
| MCU | RP2350 |
21-
|:-----------|:------------------------------------------------------------|
22-
| Family | Dual Cortex-M33 or Hazard3 (RISC-V) |
23-
| Vendor | Raspberry Pi |
24-
| RAM | 520 kB on-chip SRAM (10 independent banks) |
25-
| Flash | Up to 16 MB external QSPI flash (Pico 2 has 4 MB by default)|
26-
| Frequency | up to 150 MHz (Set to 125 MHz in RIOT) |
27-
| Security | Boot signing, key storage, SHA-256 accelerator |
28-
| PIOs | 12 state machines |
29-
| UARTs | 2 |
30-
| SPIs | 2 |
31-
| I2Cs | 2 |
32-
| PWM | 24 channels |
33-
| USB | USB 1.1 controller with host and device support |
34-
| Power | On-chip switched-mode power supply with LDO sleep mode |
35-
| OTP | 8 kB of one-time-programmable storage |
36-
| Datasheet | [RP2350 Datasheet](https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf) |
37-
38-
## User Interfaces
39-
40-
| Interface | Description |
41-
|:-----------|:-------------------------------------------------------------|
42-
| LED0 | User LED (GPIO 0 at Pin 25) |
43-
| SW0 | Button used in flash process, can be accessed using registers but difficult |
44-
45-
## Pinout
46-
47-
![Pinout Diagram](https://www.raspberrypi.com/documentation/microcontrollers/images/pico-2-r4-pinout.svg)
48-
49-
## Flashing the Board
50-
51-
The Raspberry Pi Pico 2 has a built-in bootloader that allows flashing via USB.
52-
However, you can also use OpenOCD for flashing the board.
53-
If you are using picotool, you need to hold the bootselect button
54-
(the only button on the board) while connecting the board to
55-
your computer via USB. This will put the board into bootloader mode,
56-
allowing you to flash it.
57-
58-
### Flashing using OpenOCD
59-
60-
If you have two Raspberry Pi Pico boards,
61-
you can utilize one as a programmer to program the other board.
62-
63-
Please refer to the
64-
[Debugprobe documentation](https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#getting-started)
65-
for more details.
66-
67-
Note that Raspberry Pi actually uses their own OpenOCD fork, which is available
68-
in the [RP2040 OpenOCD repository](https://github.com/raspberrypi/openocd).
69-
While technically you can use the standard OpenOCD,
70-
it is recommended to use the Raspberry Pi fork for better compatibility with the
71-
RP2350, as its still fairly "new" and under development,
72-
which is why even their own Pico SDK Extension
73-
uses the Raspberry Pi fork of OpenOCD, instead of the standard one.
74-
75-
To do this, you need to connect the board to your computer
76-
and use the following command:
77-
78-
```bash
79-
PROGRAMMER=openocd BOARD=rpi-pico-2-arm make flash
80-
```
81-
82-
You can then debug your application using GDB with the following command:
83-
84-
```bash
85-
PROGRAMMER=openocd BOARD=rpi-pico-2-arm make debug
86-
```
87-
88-
### Flashing using Picotool
89-
90-
Simply connect the board to your computer via USB and use the following command:
91-
92-
```bash
93-
BOARD=rpi-pico-2-arm make flash
94-
```
95-
96-
This is the default method for flashing the Raspberry Pi Pico 2.
97-
However, it does not allow for debugging using GDB.
98-
99-
@note When programming the board with the Picotool for the first time,
100-
RIOT will download and install the Picotool locally in the RIOT folder.
101-
This process will take some minutes to complete.
102-
103-
## Known Issues {#rpi_pico_2_known_issues}
104-
105-
Currently RP2350 support is rather minimal,
106-
as such peripheral support is extremely limited.
107-
The following peripherals are supported:
108-
109-
- GPIO
110-
- Non-configurable write-only UART (UART0 using Pin 0 and 1)
111-
- The UART Baudrate is set to 115200.
112-
- UART does not work via USB, you need to connect it directly to the GPIO pins.
113-
114-
More peripherals will be added in the future.
115-
It should also be noted that we currently only support the Cortex M33 cores,
116-
not the RISC-V Hazard cores.
5+
See @ref boards_rpi_pico_2_riscv for further information.

boards/rpi-pico-2-riscv/doc.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ If you are using picotool, you need to hold the bootselect button
5555
your computer via USB. This will put the board into bootloader mode,
5656
allowing you to flash it.
5757

58+
Generally while Picotool is the easiest way to flash the board,
59+
it does not allow for debugging using GDB.
60+
61+
It does tend to be more reliable than OpenOCD though,
62+
especially when switching between RISC-V and ARM cores.
63+
5864
### Flashing using OpenOCD
5965

6066
If you have two Raspberry Pi Pico boards,
@@ -79,12 +85,24 @@ and use the following command:
7985
PROGRAMMER=openocd BOARD=rpi-pico-2-riscv make flash
8086
```
8187

88+
or, if you want to use the CortexM:
89+
90+
```bash
91+
PROGRAMMER=openocd BOARD=rpi-pico-2-arm make flash
92+
```
93+
8294
You can then debug your application using GDB with the following command:
8395

8496
```bash
8597
PROGRAMMER=openocd BOARD=rpi-pico-2-riscv make debug
8698
```
8799

100+
or, if you want to use the CortexM:
101+
102+
```bash
103+
PROGRAMMER=openocd BOARD=rpi-pico-2-arm make debug
104+
```
105+
88106
### Flashing using Picotool
89107

90108
Simply connect the board to your computer via USB and use the following command:
@@ -93,6 +111,12 @@ Simply connect the board to your computer via USB and use the following command:
93111
BOARD=rpi-pico-2-riscv make flash
94112
```
95113

114+
or, if you want to use the CortexM:
115+
116+
```bash
117+
BOARD=rpi-pico-2-arm make flash
118+
```
119+
96120
This is the default method for flashing the Raspberry Pi Pico 2.
97121
However, it does not allow for debugging using GDB.
98122

@@ -106,11 +130,10 @@ Currently RP2350 support is rather minimal,
106130
as such peripheral support is extremely limited.
107131
The following peripherals are supported:
108132

133+
- XH3IRQ RISC-V Interrupt Controller (CortexM Interrupts also work)
109134
- GPIO
110-
- Non-configurable write-only UART (UART0 using Pin 0 and 1)
135+
- UART
111136
- The UART Baudrate is set to 115200.
112137
- UART does not work via USB, you need to connect it directly to the GPIO pins.
113138

114139
More peripherals will be added in the future.
115-
It should also be noted that we currently only support the Cortex M33 cores,
116-
not the RISC-V Hazard cores.

0 commit comments

Comments
 (0)