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
I'm combining the rp2040 w wifi_blinky.rs and multicore.rs examples into a single code file. I can set the wifi driven LED anywhere in my main fn, but when I spawn a new task, the call to control.gpio_set(0, true).await; hangs.
#[embassy_executor::task]
async fn core0_task(
motion_pin: embassy_rp::peripherals::PIN_28,
control: &'static mut Control<'static>,
stack: &'static mut embassy_net::Stack<'static>,
seed: u64,
display_led: &'static DisplayMutex,
) -> ! {
show_screen_text(display_led, "Setting up motion", false).await;
let mut motion_pin = Input::new(motion_pin, Pull::None); // Read the level of the pin 28
loop {
motion_pin.wait_for_falling_edge().await;
show_screen_text(display_led, "Motion detected", true).await;
info!("GPIO 28 is low - turning on LED");
control.gpio_set(0, true).await; // Code hangs here
info!("making a web request");
make_request(stack, seed).await;
info!("turning off LED");
control.gpio_set(0, false).await;
}
}
I'm combining the rp2040 w wifi_blinky.rs and multicore.rs examples into a single code file. I can set the wifi driven LED anywhere in my main fn, but when I spawn a new task, the call to control.gpio_set(0, true).await; hangs.
The last entry in the log is:
DEBUG iovar set gpioout = [01, 00, 00, 00, 01, 00, 00, 00]
└─ cyw43::control::{impl#3}::set_iovar_v::{async_fn#0} @ C:\Users\johny.cargo\git\checkouts\embassy-9312dcb0ed774b29\c775604\cyw43\src\control.rs:566
which is the same as when it's called in main, but it doesn't hang
The text was updated successfully, but these errors were encountered: