Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4881

SDK • Hang on cyw43_arch_gpio_put() when network active.

$
0
0
It would seem that its not safe to call cyw43_arch_gpio_put() while network is active (linking against pico_cyw43_arch_lwip_threadsafe_background)?

Symptom is that function call cyw43_arch_gpio_put() never returns (or at least within maximum wathchdog timeout about 8 seconds).

This seems very infrequent occurrence, it can take hours or days to reproduce the issue, by toggling LED on and off every second while there is network activity happening on the background.


Perhaps this is some kind of timing issue that if some WiFi network activity happens at the exact same moment moment when cyw43_ach_gpio_put() is executing, it can lead to hang... (?)


Btw, seems like similar issue reported earlier this year: viewtopic.php?t=362859



Adding calls to cyw43_arch_lwip_begin() and ..._end(), seemed to help. I am not 100% sure, if this actually fixed the problem, but so far have been unable to reproduce the problem after the change...

Code:

                                cyw43_arch_lwip_begin();                                cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, led_state);                                cyw43_arch_lwip_end();

Statistics: Posted by vadelma-pi — Thu Aug 22, 2024 7:24 pm



Viewing all articles
Browse latest Browse all 4881

Trending Articles