diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-07-17 22:13:48 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-17 22:13:48 +0000 |
| commit | 3e1b0e4aec11888d6ea41ef5c62d6d2912d81eae (patch) | |
| tree | 3cab09f54b7418768f9ab5e02b088fa7bd2c672e | |
| parent | e3aff148f488221829b55b8ff3266d7ce0d05a32 (diff) | |
| parent | 7be5ce2a31cc2106d589dbb63552ebc509eb27bb (diff) | |
Merge pull request #4414 from quarters78/main
RP2350: Fix PIO clock divider in the blinky Wi-Fi example
| -rw-r--r-- | examples/rp235x/src/bin/blinky_wifi.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/rp235x/src/bin/blinky_wifi.rs b/examples/rp235x/src/bin/blinky_wifi.rs index 8c352ebc4..ef6057a1c 100644 --- a/examples/rp235x/src/bin/blinky_wifi.rs +++ b/examples/rp235x/src/bin/blinky_wifi.rs | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #![no_std] | 5 | #![no_std] |
| 6 | #![no_main] | 6 | #![no_main] |
| 7 | 7 | ||
| 8 | use cyw43_pio::{PioSpi, DEFAULT_CLOCK_DIVIDER}; | 8 | use cyw43_pio::{PioSpi, RM2_CLOCK_DIVIDER}; |
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_rp::bind_interrupts; | 11 | use embassy_rp::bind_interrupts; |
| @@ -58,7 +58,9 @@ async fn main(spawner: Spawner) { | |||
| 58 | let spi = PioSpi::new( | 58 | let spi = PioSpi::new( |
| 59 | &mut pio.common, | 59 | &mut pio.common, |
| 60 | pio.sm0, | 60 | pio.sm0, |
| 61 | DEFAULT_CLOCK_DIVIDER, | 61 | // SPI communication won't work if the speed is too high, so we use a divider larger than `DEFAULT_CLOCK_DIVIDER`. |
| 62 | // See: https://github.com/embassy-rs/embassy/issues/3960. | ||
| 63 | RM2_CLOCK_DIVIDER, | ||
| 62 | pio.irq0, | 64 | pio.irq0, |
| 63 | cs, | 65 | cs, |
| 64 | p.PIN_24, | 66 | p.PIN_24, |
