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
+85-8Lines changed: 85 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,32 @@
1
-
# Raspberry Pi Pico SDK Examples
1
+
# Raspberry Pi RP2350 Pico SDK Examples - Early Access
2
+
3
+
## RP2350 Instructions
4
+
5
+
Everything below this section is from the stock pico-examples, so ignore URLs etc., but generally instructions are the same.
6
+
7
+
The Pico SDK default continues to be to build for RP2040 (PICO_PLATFORM=rp2040), so to build for RP2350, you need to pass
8
+
`-DPICO_PLATFORM=rp2350` to CMake (or `-DPICO_PLATFORM=rp2350-riscv` for RISC-V).
9
+
10
+
Most, but not all examples, currently work on RP2350 however you should be able to do a full build with any of the above platforms (PICO_PLATFORM=host however currently fails on some examples)
11
+
12
+
For RISC-V compilation, you should take a compiler from here: https://www.embecosm.com/resources/tool-chain-downloads/#riscv-stable
13
+
14
+
# Original pico-examples docs
2
15
3
16
## Getting started
4
17
5
18
See [Getting Started with the Raspberry Pi Pico](https://rptl.io/pico-get-started) and the README in the [pico-sdk](https://github.com/raspberrypi/pico-sdk) for information
6
19
on getting up and running.
7
20
8
-
### First Examples
21
+
### First Examples
9
22
10
-
App|Description | Link to prebuilt UF2
11
-
---|---|---
12
-
[hello_serial](hello_world/serial) | The obligatory Hello World program for Pico (Output over serial version) |
13
-
[hello_usb](hello_world/usb) | The obligatory Hello World program for Pico (Output over USB version) | https://rptl.io/pico-hello-usb
14
-
[blink](blink) | Blink an LED on and off. | https://rptl.io/pico-blink
[hello_serial](hello_world/serial) | The obligatory Hello World program for Pico (Output over serial version) |
26
+
[hello_usb](hello_world/usb) | The obligatory Hello World program for Pico (Output over USB version) | https://rptl.io/pico-hello-usb
27
+
[blink](blink) | Blink an LED on and off. Works on both boards with regular LEDs and Pico W | https://rptl.io/pico-blink
28
+
[blink_simple](blink_simple) | Blink an LED on and off. Does not work on Pico W. | https://rptl.io/pico-blink
29
+
[picow_blink](pico_w/wifi/blink) | Blinks the Pico W on-board LED (which is connected via the WiFi chip). | http://rptl.io/pico-w-blink
15
30
16
31
### ADC
17
32
@@ -25,6 +40,11 @@ App|Description
25
40
[dma_capture](adc/dma_capture) | Use the DMA to capture many samples from the ADC.
26
41
[read_vsys](adc/read_vsys) | Demonstrates how to read VSYS to get the voltage of the power supply.
27
42
43
+
### Bootloaders (RP2350 Only)
44
+
App|Description
45
+
---|---
46
+
[enc_bootloader](bootloaders/encrypted) | A bootloader which decrypts binaries from flash into SRAM. See the separate [README](bootloaders/encrypted/README.md) for more information
47
+
28
48
### Clocks
29
49
30
50
App|Description
@@ -40,6 +60,12 @@ App|Description
40
60
---|---
41
61
[build_variants](cmake/build_variants) | Builds two version of the same app with different configurations
42
62
63
+
### DCP
64
+
65
+
App|Description
66
+
---|---
67
+
[hello_dcp](dcp/hello_dcp) | Use the double-precision coprocessor directly in assembler.
68
+
43
69
### DMA
44
70
45
71
App|Description
@@ -49,6 +75,12 @@ App|Description
49
75
[channel_irq](dma/channel_irq) | Use an IRQ handler to reconfigure a DMA channel, in order to continuously drive data through a PIO state machine.
50
76
[sniff_crc](dma/sniff_crc) | Use the DMA engine's 'sniff' capability to calculate a CRC32 on a data buffer.
51
77
78
+
### HSTX
79
+
80
+
App|Description
81
+
---|---
82
+
[dvi_out_hstx_encoder](dvi_out_hstx_encoder)`RP2350`| Use the HSTX to output a DVI signal with 3:3:2 RGB
83
+
52
84
### Flash
53
85
54
86
App|Description
@@ -58,6 +90,15 @@ App|Description
58
90
[program](flash/program) | Erase a flash sector, program one flash page, and read back the data.
59
91
[xip_stream](flash/xip_stream) | Stream data using the XIP stream hardware, which allows data to be DMA'd in the background whilst executing code from flash.
60
92
[ssi_dma](flash/ssi_dma) | DMA directly from the flash interface (continuous SCK clocking) for maximum bulk read performance.
93
+
[runtime_flash_permissions](flash/runtime_flash_permissions) | Demonstrates adding partitions at runtime to change the flash permissions
94
+
95
+
### FreeRTOS
96
+
97
+
These examples require you to set the `FREERTOS_KERNEL_PATH` to point to the FreeRTOS Kernel. See https://github.com/FreeRTOS/FreeRTOS-Kernel
98
+
99
+
App|Description
100
+
---|---
101
+
[hello_freertos](freertos/hello_freertos) | Examples that demonstrate how run FreeRTOS and tasks on 1 or 2 cores.
61
102
62
103
### GPIO
63
104
@@ -106,6 +147,13 @@ App|Description
106
147
[hello_multicore](multicore/hello_multicore) | Launch a function on the second core, printf some messages on each core, and pass data back and forth through the mailbox FIFOs.
107
148
[multicore_fifo_irqs](multicore/multicore_fifo_irqs) | On each core, register and interrupt handler for the mailbox FIFOs. Show how the interrupt fires when that core receives a message.
108
149
[multicore_runner](multicore/multicore_runner) | Set up the second core to accept, and run, any function pointer pushed into its mailbox FIFO. Push in a few pieces of code and get answers back.
150
+
[multicore_doorbell](multicore/multicore_doorbell) | Claims two doorbells for signaling between the cores. Counts how many doorbell IRQs occur on the second core and uses doorbells to coordinate exit.
151
+
152
+
### OTP
153
+
154
+
App|Description
155
+
---|---
156
+
[hello_otp](otp/hello_otp) | Demonstrate reading and writing from the OTP on RP2350, along with some of the features of OTP (error correction and page locking).
109
157
110
158
### Pico Board
111
159
@@ -122,6 +170,7 @@ App|Description
122
170
---|---
123
171
[picow_access_point](pico_w/wifi/access_point) | Starts a WiFi access point, and fields DHCP requests.
124
172
[picow_blink](pico_w/wifi/blink) | Blinks the on-board LED (which is connected via the WiFi chip).
173
+
[picow_blink_slow_clock](pico_w/wifi/blink_slow_clock) | Blinks the on-board LED (which is connected via the WiFi chip) with a slower system clock to show how to reconfigure communication with the WiFi chip under those circumstances
125
174
[picow_iperf_server](pico_w/wifi/iperf) | Runs an "iperf" server for WiFi speed testing.
126
175
[picow_ntp_client](pico_w/wifi/ntp_client) | Connects to an NTP server to fetch and display the current time.
127
176
[picow_tcp_client](pico_w/wifi/tcp_client) | A simple TCP client. You can run [python_test_tcp_server.py](pico_w/wifi/python_test_tcp/python_test_tcp_server.py) for it to connect to.
@@ -130,18 +179,22 @@ App|Description
130
179
[picow_tls_verify](pico_w/wifi/tls_client) | Demonstrates how to make a HTTPS request using TLS with certificate verification.
131
180
[picow_wifi_scan](pico_w/wifi/wifi_scan) | Scans for WiFi networks and prints the results.
132
181
[picow_udp_beacon](pico_w/wifi/udp_beacon) | A simple UDP transmitter.
182
+
[picow_httpd](pico_w/wifi/httpd) | Runs a LWIP HTTP server test app
133
183
134
184
#### FreeRTOS examples
135
185
136
186
These are examples of integrating Pico W networking under FreeRTOS, and require you to set the `FREERTOS_KERNEL_PATH`
137
-
to point to the FreeRTOS Kernel.
187
+
to point to the FreeRTOS Kernel. See https://github.com/FreeRTOS/FreeRTOS-Kernel
138
188
139
189
App|Description
140
190
---|---
141
191
[picow_freertos_iperf_server_nosys](pico_w/wifi/freertos/iperf) | Runs an "iperf" server for WiFi speed testing under FreeRTOS in NO_SYS=1 mode. The LED is blinked in another task
142
192
[picow_freertos_iperf_server_sys](pico_w/wifi/freertos/iperf) | Runs an "iperf" server for WiFi speed testing under FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode. The LED is blinked in another task
143
193
[picow_freertos_ping_nosys](pico_w/wifi/freertos/ping) | Runs the lwip-contrib/apps/ping test app under FreeRTOS in NO_SYS=1 mode.
144
194
[picow_freertos_ping_sys](pico_w/wifi/freertos/ping) | Runs the lwip-contrib/apps/ping test app under FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode. The test app uses the lwIP _socket_ API in this case.
195
+
[picow_freertos_ntp_client_socket](pico_w/wifi/freertos/ntp_client_socket) | Connects to an NTP server using the LwIP Socket API with FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode.
196
+
[pico_freertos_httpd_nosys](pico_w/wifi/freertos/httpd) | Runs a LWIP HTTP server test app under FreeRTOS in NO_SYS=1 mode.
197
+
[pico_freertos_httpd_sys](pico_w/wifi/freertos/httpd) | Runs a LWIP HTTP server test app under FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode.
145
198
146
199
### Pico W Bluetooth
147
200
@@ -153,6 +206,8 @@ default being *background*. This can be changed by passing `-DBTSTACK_EXAMPLE_TY
153
206
examples can be built (which may be slow) by passing `-DBTSTACK_EXAMPLE_TYPE=all`
154
207
Freertos versions can only be built if `FREERTOS_KERNEL_PATH` is defined.
155
208
209
+
The Bluetooth examples that use audio require code in [pico-extras](https://github.com/raspberrypi/pico-extras). Pass `-DPICO_EXTRAS_PATH=${HOME}/pico-extras` on the cmake command line or define `PICO_EXTRAS_PATH=${HOME}/pico-extras` in your environment and re-run cmake to include them in the build.
210
+
156
211
App|Description
157
212
---|---
158
213
[picow_bt_example_a2dp_sink_demo](https://github.com/bluekitchen/btstack/tree/master/example/a2dp_sink_demo.c) | A2DP Sink - Receive Audio Stream and Control Playback.
@@ -230,8 +285,10 @@ App|Description
230
285
[pwm](pio/pwm) | Pulse width modulation on PIO. Use it to gradually fade the brightness of an LED.
231
286
[spi](pio/spi) | Use PIO to erase, program and read an external SPI flash chip. A second example runs a loopback test with all four CPHA/CPOL combinations.
232
287
[squarewave](pio/squarewave) | Drive a fast square wave onto a GPIO. This example accesses low-level PIO registers directly, instead of using the SDK functions.
288
+
[squarewave_div_sync](pio/squarewave) | Generates a square wave on three GPIOs and synchronises the divider on all the state machines
233
289
[st7789_lcd](pio/st7789_lcd) | Set up PIO for 62.5 Mbps serial output, and use this to display a spinning image on a ST7789 serial LCD.
234
290
[quadrature_encoder](pio/quadrature_encoder) | A quadrature encoder using PIO to maintain counts independent of the CPU.
291
+
[quadrature_encoder_substep](pio/quadrature_encoder_substep) | High resolution speed measurement using a standard quadrature encoder
235
292
[uart_rx](pio/uart_rx) | Implement the receive component of a UART serial port. Attach it to the spare Arm UART to see it receive characters.
236
293
[uart_tx](pio/uart_tx) | Implement the transmit component of a UART serial port, and print hello world.
237
294
[ws2812](pio/ws2812) | Examples of driving WS2812 addressable RGB LEDs.
@@ -260,6 +317,13 @@ App|Description
260
317
[rtc_alarm](rtc/rtc_alarm) | Set an alarm on the RTC to trigger an interrupt at a date/time 5 seconds into the future.
261
318
[rtc_alarm_repeat](rtc/rtc_alarm_repeat) | Trigger an RTC interrupt once per minute.
262
319
320
+
### SHA-256
321
+
322
+
App|Description
323
+
---|---
324
+
[hello_sha256](sha/sha256) | Demonstrates how to use the pico_sha256 library to calculate a checksum using the hardware in rp2350
325
+
[mbedtls_sha256](sha/mbedtls_sha256) | Demonstrates using the SHA-256 hardware acceleration in mbedtls
326
+
263
327
### SPI
264
328
265
329
App|Description
@@ -276,7 +340,9 @@ App|Description
276
340
277
341
App|Description
278
342
---|---
343
+
[boot_info](system/boot_info) | Demonstrate how to read and interpret sys info boot info.
279
344
[hello_double_tap](system/hello_double_tap) | An LED blink with the `pico_bootsel_via_double_reset` library linked. This enters the USB bootloader when it detects the system being reset twice in quick succession, which is useful for boards with a reset button but no BOOTSEL button.
345
+
[rand](system/rand) | Demonstrate how to use the pico random number functions.
280
346
[narrow_io_write](system/narrow_io_write) | Demonstrate the effects of 8-bit and 16-bit writes on a 32-bit IO register.
281
347
[unique_board_id](system/unique_board_id) | Read the 64 bit unique ID from external flash, which serves as a unique identifier for the board.
282
348
@@ -296,6 +362,17 @@ App|Description
296
362
[lcd_uart](uart/lcd_uart) | Display text and symbols on a 16x02 RGB LCD display via UART
297
363
[uart_advanced](uart/uart_advanced) | Use some other UART features like RX interrupts, hardware control flow, and data formats other than 8n1.
298
364
365
+
### Universal
366
+
367
+
These are examples of how to build universal binaries which run on RP2040, and RP2350 Arm & RISC-V.
368
+
These require you to set `PICO_ARM_TOOLCHAIN_PATH` and `PICO_RISCV_TOOLCHAIN_PATH` to appropriate paths, to ensure you have compilers for both architectures.
369
+
370
+
App|Description
371
+
---|---
372
+
[blink](universal/CMakeLists.txt#L126) | Same as the [blink](blink) example, but universal.
373
+
[hello_universal](universal/hello_universal) | The obligatory Hello World program for Pico (USB and serial output). On RP2350 it will reboot to the other architecture after every 10 prints.
374
+
[nuke_universal](universal/CMakeLists.txt#L132) | Same as the [nuke](flash/nuke) example, but universal. On RP2350 runs as a packaged SRAM binary, so is written to flash and copied to SRAM by the bootloader
0 commit comments