WiFi stack hangs at cyw43_arch_enable_sta_mode() without error when running for RISC-V #3118
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#3118
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It appears that the cyw43 driver hard hangs at cyw43_arch_enable_sta_mode() when running on the RISC-V cores. Any ideas/suggestions?
Can I add more debugging detail?
I think I have isolated this issue down to RISC-V vs. Arm (where the same WiFi setup code works) after trying a number of other settings.
I had tried to isolate it to lwip options (background vs. polling), running from flash vs. RAM, SPI, and other things. In the end it appears to be related to RISC-V support.
With cyw43 debug options on, I saw that things would hang with this detail:
at which point there appears to be a "hard" hang: using the usual VSCode "Run" command would not work on the device until I unplugged it and plug it back setting it into BOOTSEL mode.
When using the same application code and
target_link_libraries, I see these messages (and eventually IP address and things seeminly working):The code is fairly generic/basic:
I just used iperf built for riscv and it connected ok. Although I wasn't using VSCode
I don't really follow - what do you mean exactly by "same application code and target_link_libraries"
Anyway - if it's locked up, can you "pause" and report the value of these registers mcause/mepc
I can reproduce a lockup on Windows. It seems to be an issue with the compiler. It would be useful to know where you're stuck and the value of the mcause register as well as the version of the sdk you're using.
Hi, thanks for the updates. I do not have debug capabilities at the moment, it's a hard hang for me and I cannot do much other than reset.
Well, or maybe I do not know how to do that: I just have a mac connected via USB-C---micro-USB--RPi-pico-2w. Any way to see those registers in that situation?
No - you need a debugger. Don't worry about it - I've almost certainly reproduced your problem.
Great job @peterharperuk and @will-v-pi!
I would like to use and verify the fix.
In the releases of the
pico-sdkI see 2.3.0-1.When will this version make it to the VSCode extension?
Alternative, any hint as to how to use this release specifically?
I tried a quick search as to how to use a custom version of the pick-sdk and I did not get too far. Any hints will be appreciated.
If you use the latest pre-release of the VS code extension the toolchain is available - you need to select Switch SDK, click your current SDK version, and then select Yes to Advanced Options and select the RISCV_PICO_2_3_0_1 toolchain version.
Ill be doing a proper release soon, just want to do some more testing before that
Took a little guessing to re-generate the
.vscode/files, however I was able to compile my previously crashing basic code and run it successfully so that it connects to WiFi successfully. Thanks!Looking forward to a release. If you want to close this issue when it's release, I will see it quickly. If not, you are welcome to close it with your further testing. Great work!