|
1 | 1 | /** |
2 | | -@defgroup boards_rpi_pico_w Raspberry Pi Pico W |
3 | | -@ingroup boards |
4 | | -@brief Support for the RP2040 based Raspberry Pi Pico W board |
5 | | - |
6 | | -## Overview |
7 | | - |
8 | | -The Raspberry Pi Pico W and Pico WH (with headers) is a board with RP2040 MCU, |
9 | | -a custom dual core ARM Cortex-M0+ MCU with relatively high CPU clock, plenty of |
10 | | -RAM, some unique peripheral (the Programmable IO) and the Infineon CYW43439 wireless |
11 | | -chip. |
12 | | - |
13 | | -## Hardware |
14 | | - |
15 | | - |
16 | | - |
17 | | -Raspberry Pi Pico W is provided in two versions - without and with headers, |
18 | | -the second one is called Pico WH. Detailed photos can be found at [Raspberry Pi Pico family](https://www.raspberrypi.com/documentation/microcontrollers/images/four_picos.jpg). |
19 | | - |
20 | | -### MCU |
21 | | - |
22 | | -The Programmable IO (PIO) peripheral and the SSI/QSPI peripheral that supports execution from |
23 | | -flash (XIP) are the most distinguishing features of the MCU. The latter is especially important, |
24 | | -since the RP2040 contains no internal flash. |
25 | | - |
26 | | -| MCU | RP2040 | |
27 | | -|:-----------|:------------------------------------------------------------ | |
28 | | -| Family | (2x) ARM Cortex-M0+ | |
29 | | -| Vendor | Raspberry Pi | |
30 | | -| RAM | 264 KiB | |
31 | | -| Flash | 2 MiB (up to 16 MiB) | |
32 | | -| Frequency | up to 133 MHz | |
33 | | -| FPU | no | |
34 | | -| PIOs | 8 | |
35 | | -| Timers | 1 x 64-bit | |
36 | | -| ADCs | 1x 12-bit (4 channels + temperature sensor) | |
37 | | -| UARTs | 2 | |
38 | | -| SPIs | 2 | |
39 | | -| I2Cs | 2 | |
40 | | -| RTCs | 1 | |
41 | | -| USBs | 1 (USB 2.0) | |
42 | | -| Watchdog | 1 | |
43 | | -| SSI/QSPI | 1 (connected to flash, with XIP support) | |
44 | | -| WiFi | via wireless chip (Infineon CYW43439) (*) | |
45 | | -| Bluetooth | via wireless chip (Infineon CYW43439) (*) | |
46 | | -| Vcc | 1.62V - 3.63V | |
47 | | -| Datasheet | [Datasheet](https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf) | |
48 | | -| Wireless chip | [Infineon CYW43439 Datasheet](https://www.infineon.com/dgdl/Infineon-CYW43439-DataSheet-v03_00-EN.pdf?fileId=8ac78c8c8386267f0183c320336c029f) | |
49 | | - |
50 | | -(*) Currently not implemented in the RIOT OS. |
51 | | - |
52 | | -### User Interface |
53 | | - |
54 | | -1 button (also used for boot selection) and 1 LED: |
55 | | - |
56 | | -| Device | PIN | |
57 | | -|:------ |:---------------- | |
58 | | -| LED0 | WL_GPIO0 (*) | |
59 | | -| SW0 | QSPI_SS_N (**) | |
60 | | - |
61 | | -(*) In the Pico W LED0 is directly connected to the Infineon CYW43439 module, |
62 | | -and cannot be directly controlled by MCU. |
63 | | - |
64 | | -(**) Since the switch is connected to the chip-select pin of the QSPI interface the flash chip RIOT |
65 | | -is running from via XIP, the switch is difficult to read out from software. This is currently not |
66 | | -supported. |
67 | | - |
68 | | -### Pinout |
69 | | - |
70 | | - |
71 | | - |
72 | | -## Flashing the Board |
73 | | - |
74 | | -### Flashing the Board Using the Bootloader |
75 | | - |
76 | | -Connect the device to your Micro-USB cable while the button (labeled `BOOTSEL` |
77 | | -on the silkscreen of the PCB) is pressed to enter the bootloader. The pico |
78 | | -will present itself as a storage medium to the system, to which a UF2 file |
79 | | -can be copied perform the flashing of the device. This can be automated by |
80 | | -running: |
81 | | - |
82 | | -``` |
83 | | -make BOARD=rpi-pico-w flash |
84 | | -``` |
85 | | - |
86 | | -This is default flashing option using elf2uf2 PROGRAMMER. If the storage is |
87 | | -not automatically mounted to `/media/<USER_NAME>/RPI-RP2`, you can overwrite |
88 | | -the path by exporting the shell environment variable `ELF2UF2_MOUNT_PATH`. |
89 | | - |
90 | | -### Flashing the Board Using OpenOCD |
91 | | - |
92 | | -Currently (June 2021), only two methods for debugging via OpenOCD are supported: |
93 | | - |
94 | | -1. Using a bit-banging low-level adapter, e.g. via the GPIOs of a Raspberry Pi 4B |
95 | | -2. Using a virtual CMSIS-DAP adapter provided by the second CPU core via |
96 | | - https://github.com/majbthrd/pico-debug |
97 | | - |
98 | | -Option 2 requires no additional hardware however, you need to |
99 | | -first "flash" the gimme-cache variant of [pico-debug](https://github.com/majbthrd/pico-debug) |
100 | | -into RAM using the UF2 bootloader. For this, plug in the USB cable while holding down the BOOTSEL |
101 | | -button of the Pico and copy the `pico-debug-gimmecache.uf2` from the |
102 | | -[latest pico-debug release](https://github.com/majbthrd/pico-debug/releases) into the virtual FAT |
103 | | -formatted drive the bootloader provides. Once this drive is unmounted again, this will result in |
104 | | -the Raspberry Pi Pico showing up as CMSIS-DAP debugger. Afterwards run: |
105 | | - |
106 | | -``` |
107 | | -make BOARD=rpi-pico-w PROGRAMMER=openocd flash |
108 | | -``` |
109 | | - |
110 | | -@warning The `rpi-pico-w` virtual debugger is not persistent and needs to be "flashed" into RAM |
111 | | - again after each cold boot. |
112 | | - |
113 | | -@note As of July 2021, the latest stable release of OpenOCD does not yet support the RP2040 |
114 | | - MCU. Instead, compile the current `master` branch from the upstream OpenOCD source. |
115 | | - The OpenOCD fork of the Raspberry Pi foundation is incompatible with OpenOCD |
116 | | - configuration provided, so please stick with upstream OpenOCD. |
117 | | - |
118 | | -### Flashing the Board Using J-Link |
119 | | - |
120 | | -Connect the Board to an Segger J-Link debugger, e.g. the EDU mini debugger is relatively affordable, |
121 | | -but limited to educational purposes. Afterwards run: |
122 | | - |
123 | | -``` |
124 | | -make BOARD=rpi-pico-w PROGRAMMER=jlink flash |
125 | | -``` |
126 | | - |
127 | | -## Accessing RIOT shell |
128 | | - |
129 | | -This board's default access to RIOT shell is via UART (UART0 TX - pin 1, UART0 RX - pin 2). |
130 | | - |
131 | | -The default baud rate is 115 200. |
132 | | - |
133 | | -The simplest way to connect to the shell is the execution of the command: |
134 | | - |
135 | | -``` |
136 | | -make BOARD=rpi-pico-w term |
137 | | -``` |
138 | | - |
139 | | -@warning Raspberry Pi Pico board is not 5V tolerant. Use voltage divider or logic level shifter when connecting to 5V UART. |
140 | | - |
141 | | -## On-Chip Debugging |
142 | | - |
143 | | -There are currently (June 2021) few hardware options for debugging the Raspberry Pi Pico: |
144 | | - |
145 | | -1. Via J-Link using one of Seggers debuggers |
146 | | -2. Via OpenOCD using a low-level bit-banging debugger (e.g. a Raspberry Pi 4B with the GPIOs |
147 | | - connected to the Raspberry Pi Pico via jump wires) |
148 | | -3. Via a recently updated [Black Magic Probe](https://github.com/blacksphere/blackmagic) |
149 | | - |
150 | | -In addition, a software-only option is possible using |
151 | | -[pico-debug](https://github.com/majbthrd/pico-debug). The default linker script reserved 16 KiB of |
152 | | -RAM for this debugger, hence just "flash" the "gimme-cache" flavor into RAM using the UF2 |
153 | | -bootloader. Once this is done, debugging is as simple as running: |
154 | | - |
155 | | -``` |
156 | | -make BOARD=rpi-pico-w debug |
157 | | -``` |
158 | | - |
159 | | -***Beware:*** The `rpi-pico-w` virtual debugger is not persistent and needs to be "flashed" into RAM |
160 | | -again after each cold boot. The initialization code of RIOT now seems to play well with the |
161 | | -debugger, so it remains persistent on soft reboots. If you face issues with losing connection to |
162 | | -the debugger on reboot, try `monitor reset init` in GDB to soft-reboot instead. |
163 | | - |
164 | | -## Known Issues / Problems |
165 | | - |
166 | | -### Early state Implementation |
167 | | - |
168 | | -Currently no support for the following peripherals is implemented: |
169 | | - |
170 | | -- Timers |
171 | | -- ADC |
172 | | -- SPI |
173 | | -- I2C |
174 | | -- USB |
175 | | -- PIO |
176 | | -- RTC |
177 | | -- Watchdog |
178 | | -- SMP support (multi CPU support is not implemented in RIOT) |
179 | | -- Infineon CYW 43439 wireless chip |
| 2 | + * @defgroup boards_rpi_pico_w Raspberry Pi Pico W |
| 3 | + * @ingroup boards |
| 4 | + * @brief Support for the RP2040 based Raspberry Pi Pico W board |
| 5 | + * |
| 6 | + * ## Overview |
| 7 | + * |
| 8 | + * The Raspberry Pi Pico W and Pico WH (with headers) is a board with RP2040 MCU, |
| 9 | + * a custom dual core ARM Cortex-M0+ MCU with relatively high CPU clock, plenty of |
| 10 | + * RAM, some unique peripheral (the Programmable IO) and the Infineon CYW43439 wireless |
| 11 | + * chip. |
| 12 | + * |
| 13 | + * ## Hardware |
| 14 | + * |
| 15 | + * @image html https://www.raspberrypi.com/documentation/computers/images/pico-w.png "Raspberry Pi Pico W" width=50% |
| 16 | + * |
| 17 | + * Raspberry Pi Pico W is provided in two versions - without and with headers, |
| 18 | + * the second one is called Pico WH. Detailed photos can be found at [Raspberry Pi Pico family](https://www.raspberrypi.com/documentation/microcontrollers/images/four_picos.jpg). |
| 19 | + * |
| 20 | + * ### MCU |
| 21 | + * |
| 22 | + * The Programmable IO (PIO) peripheral and the SSI/QSPI peripheral that supports execution from |
| 23 | + * flash (XIP) are the most distinguishing features of the MCU. The latter is especially important, |
| 24 | + * since the RP2040 contains no internal flash. |
| 25 | + * |
| 26 | + * | MCU | RP2040 | |
| 27 | + * |:-----------|:------------------------------------------------------------ | |
| 28 | + * | Family | (2x) ARM Cortex-M0+ | |
| 29 | + * | Vendor | Raspberry Pi | |
| 30 | + * | RAM | 264 KiB | |
| 31 | + * | Flash | 2 MiB (up to 16 MiB) | |
| 32 | + * | Frequency | up to 133 MHz | |
| 33 | + * | FPU | no | |
| 34 | + * | PIOs | 8 | |
| 35 | + * | Timers | 1 x 64-bit | |
| 36 | + * | ADCs | 1x 12-bit (4 channels + temperature sensor) | |
| 37 | + * | UARTs | 2 | |
| 38 | + * | SPIs | 2 | |
| 39 | + * | I2Cs | 2 | |
| 40 | + * | RTCs | 1 | |
| 41 | + * | USBs | 1 (USB 2.0) | |
| 42 | + * | Watchdog | 1 | |
| 43 | + * | SSI/QSPI | 1 (connected to flash, with XIP support) | |
| 44 | + * | WiFi | via wireless chip (Infineon CYW43439) (*) | |
| 45 | + * | Bluetooth | via wireless chip (Infineon CYW43439) (*) | |
| 46 | + * | Vcc | 1.62V - 3.63V | |
| 47 | + * | Datasheet | [Datasheet](https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf) | |
| 48 | + * | Wireless chip | [Infineon CYW43439 Datasheet](https://www.infineon.com/dgdl/Infineon-CYW43439-DataSheet-v03_00-EN.pdf?fileId=8ac78c8c8386267f0183c320336c029f) | |
| 49 | + * |
| 50 | + * (*) Currently not implemented in the RIOT OS. |
| 51 | + * |
| 52 | + * ### User Interface |
| 53 | + * |
| 54 | + * 1 button (also used for boot selection) and 1 LED: |
| 55 | + * |
| 56 | + * | Device | PIN | |
| 57 | + * |:------ |:---------------- | |
| 58 | + * | LED0 | WL_GPIO0 (*) | |
| 59 | + * | SW0 | QSPI_SS_N (**) | |
| 60 | + * |
| 61 | + * (*) In the Pico W LED0 is directly connected to the Infineon CYW43439 module, |
| 62 | + * and cannot be directly controlled by MCU. |
| 63 | + * |
| 64 | + * (**) Since the switch is connected to the chip-select pin of the QSPI interface the flash chip RIOT |
| 65 | + * is running from via XIP, the switch is difficult to read out from software. This is currently not |
| 66 | + * supported. |
| 67 | + * |
| 68 | + * ### Pinout |
| 69 | + * |
| 70 | + *  |
| 71 | + * |
| 72 | + * ## Flashing the Board |
| 73 | + * |
| 74 | + * ### Flashing the Board Using the Bootloader |
| 75 | + * |
| 76 | + * Connect the device to your Micro-USB cable while the button (labeled `BOOTSEL` |
| 77 | + * on the silkscreen of the PCB) is pressed to enter the bootloader. The pico |
| 78 | + * will present itself as a storage medium to the system, to which a UF2 file |
| 79 | + * can be copied perform the flashing of the device. This can be automated by |
| 80 | + * running: |
| 81 | + * |
| 82 | + * ``` |
| 83 | + * make BOARD=rpi-pico-w flash |
| 84 | + * ``` |
| 85 | + * |
| 86 | + * This is default flashing option using elf2uf2 PROGRAMMER. If the storage is |
| 87 | + * not automatically mounted to `/media/<USER_NAME>/RPI-RP2`, you can overwrite |
| 88 | + * the path by exporting the shell environment variable `ELF2UF2_MOUNT_PATH`. |
| 89 | + * |
| 90 | + * ### Flashing the Board Using OpenOCD |
| 91 | + * |
| 92 | + * Currently (June 2021), only two methods for debugging via OpenOCD are supported: |
| 93 | + * |
| 94 | + * 1. Using a bit-banging low-level adapter, e.g. via the GPIOs of a Raspberry Pi 4B |
| 95 | + * 2. Using a virtual CMSIS-DAP adapter provided by the second CPU core via |
| 96 | + * https://github.com/majbthrd/pico-debug |
| 97 | + * |
| 98 | + * Option 2 requires no additional hardware however, you need to |
| 99 | + * first "flash" the gimme-cache variant of [pico-debug](https://github.com/majbthrd/pico-debug) |
| 100 | + * into RAM using the UF2 bootloader. For this, plug in the USB cable while holding down the BOOTSEL |
| 101 | + * button of the Pico and copy the `pico-debug-gimmecache.uf2` from the |
| 102 | + * [latest pico-debug release](https://github.com/majbthrd/pico-debug/releases) into the virtual FAT |
| 103 | + * formatted drive the bootloader provides. Once this drive is unmounted again, this will result in |
| 104 | + * the Raspberry Pi Pico showing up as CMSIS-DAP debugger. Afterwards run: |
| 105 | + * |
| 106 | + * ``` |
| 107 | + * make BOARD=rpi-pico-w PROGRAMMER=openocd flash |
| 108 | + * ``` |
| 109 | + * |
| 110 | + * @warning The `rpi-pico-w` virtual debugger is not persistent and needs to be "flashed" into RAM |
| 111 | + * again after each cold boot. |
| 112 | + * |
| 113 | + * @note The RP2040 MCU is supported from OpenOCD version 0.12.0 onwards. |
| 114 | + * |
| 115 | + * ### Flashing the Board Using J-Link |
| 116 | + * |
| 117 | + * Connect the Board to an Segger J-Link debugger, e.g. the EDU mini debugger is relatively affordable, |
| 118 | + * but limited to educational purposes. Afterwards run: |
| 119 | + * |
| 120 | + * ``` |
| 121 | + * make BOARD=rpi-pico-w PROGRAMMER=jlink flash |
| 122 | + * ``` |
| 123 | + * |
| 124 | + * ## Accessing RIOT shell |
| 125 | + * |
| 126 | + * This board's default access to RIOT shell is via UART (UART0 TX - pin 1, UART0 RX - pin 2). |
| 127 | + * |
| 128 | + * The default baud rate is 115 200. |
| 129 | + * |
| 130 | + * The simplest way to connect to the shell is the execution of the command: |
| 131 | + * |
| 132 | + * ``` |
| 133 | + * make BOARD=rpi-pico-w term |
| 134 | + * ``` |
| 135 | + * |
| 136 | + * @warning Raspberry Pi Pico board is not 5V tolerant. Use voltage divider or logic level shifter when connecting to 5V UART. |
| 137 | + * |
| 138 | + * ## On-Chip Debugging |
| 139 | + * |
| 140 | + * There are currently (June 2021) few hardware options for debugging the Raspberry Pi Pico: |
| 141 | + * |
| 142 | + * 1. Via J-Link using one of Seggers debuggers |
| 143 | + * 2. Via OpenOCD using a low-level bit-banging debugger (e.g. a Raspberry Pi 4B with the GPIOs |
| 144 | + * connected to the Raspberry Pi Pico via jump wires) |
| 145 | + * 3. Via a recently updated [Black Magic Probe](https://github.com/blacksphere/blackmagic) |
| 146 | + * |
| 147 | + * In addition, a software-only option is possible using |
| 148 | + * [pico-debug](https://github.com/majbthrd/pico-debug). The default linker script reserved 16 KiB of |
| 149 | + * RAM for this debugger, hence just "flash" the "gimme-cache" flavor into RAM using the UF2 |
| 150 | + * bootloader. Once this is done, debugging is as simple as running: |
| 151 | + * |
| 152 | + * ``` |
| 153 | + * make BOARD=rpi-pico-w debug |
| 154 | + * ``` |
| 155 | + * |
| 156 | + * ***Beware:*** The `rpi-pico-w` virtual debugger is not persistent and needs to be "flashed" |
| 157 | + * into RAM again after each cold boot. The initialization code of RIOT now seems to play well with the |
| 158 | + * debugger, so it remains persistent on soft reboots. If you face issues with losing connection to |
| 159 | + * the debugger on reboot, try `monitor reset init` in GDB to soft-reboot instead. |
| 160 | + * |
| 161 | + * ## Known Issues / Problems |
| 162 | + * |
| 163 | + * ### Early State Implementation |
| 164 | + * |
| 165 | + * Currently no support for the following peripherals is implemented: |
| 166 | + * |
| 167 | + * - USB |
| 168 | + * - RTC |
| 169 | + * - Watchdog |
| 170 | + * - SMP support (multi CPU support is not implemented in RIOT) |
| 171 | + * - Infineon CYW 43439 wireless chip |
| 172 | + * |
| 173 | + * The I2C peripheral is implemented through the PIO. |
180 | 174 | */ |
0 commit comments