embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
5.52k stars 768 forks source link

cyw43 TcpServer stops responding. #2168

Closed hirschenberger closed 11 months ago

hirschenberger commented 12 months ago

My TccServer stopps responding after this debug output:

15337.309503 DEBUG set gpioout = [01, 00, 00, 00, 00, 00, 00, 00]                                                                                                                                                                            │
│└─ cyw43::control::{impl#0}::set_iovar_v::{async_fn#0} @ /home/hirschen/.cargo/git/checkouts/embassy-9312dcb0ed774b29/9458657/cyw43/src/fmt.rs:130                                                                                           │
│15337.316357 WARN  packet too short, len=0                                                                                                                                                                                                   │
│└─ cyw43::structs::{impl#0}::parse @ /home/hirschen/.cargo/git/checkouts/embassy-9312dcb0ed774b29/9458657/cyw43/src/fmt.rs:156                                                                                                               │
│15337.328844 DEBUG LOGS: 015269.267 I_XU                                                                                                                                                                                                     │
│└─ cyw43::runner::{impl#1}::log_read::{async_fn#0} @ /home/hirschen/.cargo/git/checkouts/embassy-9312dcb0ed774b29/9458657/cyw43/src/fmt.rs:130                                                                                               │
│15337.329243 DEBUG LOGS: 015269.269 I_XU                                                                                                                                                                                                     │
│└─ cyw43::runner::{impl#1}::log_read::{async_fn#0} @ /home/hirschen/.cargo/git/checkouts/embassy-9312dcb0ed774b29/9458657/cyw43/src/fmt.rs:130                                                                                               │
│15337.330757 WARN  IRQ DATA_UNAVAILABLE, clearing...                                                                                                                                                                                         │
│└─ cyw43::runner::{impl#1}::handle_irq::{async_fn#0} @ /home/hirschen/.cargo/git/checkouts/embassy-9312dcb0ed774b29/9458657/cyw43/src/fmt.rs:156                                                                                             │
│15338.130588 DEBUG === EVENT PSK_SUP: EventMessage { version: 2, flags: 0, event_type: 46, status: 6, reason: 0, auth_type: 0, datalen: 0, addr: [0, 0, 0, 0, 0, 0], ifname: [77, 6c, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ifidx: 0, b│
│sscfgidx: 0, }  []                                                                                                                                                                                                                           │
│└─ cyw43::runner::{impl#1}::rx @ /home/hirschen/.cargo/git/checkouts/embassy-9312dcb0ed774b29/9458657/cyw43/src/fmt.rs:130                                              

Any clues?

Dirbaio commented 11 months ago

Hard to know, but it might be a hardware issue Make sure you're powering the Pico W with 5v, not with 3v3, I've seen it cause instability like that.

hirschenberger commented 11 months ago

I resolved it by making my handlers non-blocking.