diff options
| author | Bailey Quarters <[email protected]> | 2025-07-17 23:16:05 +0200 |
|---|---|---|
| committer | Bailey Quarters <[email protected]> | 2025-07-17 23:16:05 +0200 |
| commit | 7be5ce2a31cc2106d589dbb63552ebc509eb27bb (patch) | |
| tree | a60c601e3f5a2486244974d5c73239bd79af4bde /examples | |
| parent | be312850c851d1e18452d9b79860b4d56ceea8e1 (diff) | |
RP2350: Fix PIO clock divider in the blinky Wi-Fi example
Diffstat (limited to 'examples')
| -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, |
