WiFi stack hangs at cyw43_arch_enable_sta_mode() without error when running for RISC-V #3118

Open
opened 2026-08-09 05:18:28 -05:00 by cpg · 7 comments
cpg commented 2026-08-09 05:18:28 -05:00 (Migrated from github.com)

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:

...
setting SPI_BUS_CONTROL 0x204b3
write_reg_u32_swap BUS_FUNCTION 0x0=0x204b3
cyw43_read_reg_u32 BUS_FUNCTION 0x0=0x200b3
read SPI_BUS_CONTROL 0x200b3
cyw43_write_reg_u8 BUS_FUNCTION 0x1d=0x10
cyw43_write_reg_u8 BUS_FUNCTION 0x4=0x99
cyw43_write_reg_u16 BUS_FUNCTION 0x6=0xbe
backplane is ready
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x8
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x48
ALP is set
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x0
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x18
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x3
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5900003
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc800=0x0
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x1
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5900001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc010=0x3
cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc044=0x0

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):

...
setting SPI_BUS_CONTROL 0x204b3
write_reg_u32_swap BUS_FUNCTION 0x0=0x204b3
cyw43_read_reg_u32 BUS_FUNCTION 0x0=0x200b3
read SPI_BUS_CONTROL 0x200b3
cyw43_write_reg_u8 BUS_FUNCTION 0x1d=0x10
cyw43_write_reg_u8 BUS_FUNCTION 0x4=0x99
cyw43_write_reg_u16 BUS_FUNCTION 0x6=0xbe
backplane is ready
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x8
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x48
ALP is set
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x0
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x18
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x3
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5920003
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc800=0x0
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x1
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810
cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5920001
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc010=0x3
cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc044=0x0
Version: 7.95.49 (2271bb6 CY) CRC: b7a28ef3 Date: Mon 2021-11-29 22:50:27 PST Ucode Ver: 1043.2162 FWID 01-c51d9400
writing 224192 bytes to 0x0
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x0
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x80
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x100
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x180
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x2
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x200
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x280
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x3
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x300
done dnload; dt = 84994 us; speed = 2637 kbytes/sec
writing 744 bytes to 0x7fd14
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x7
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x780
done dnload; dt = 591 us; speed = 1258 kbytes/sec
cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xfffc=0xff4500ba
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x18
cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800
...

The code is fairly generic/basic:

int main()
{
    int wifi_status = -1;
    uint8_t *ip_address = NULL;

    stdio_init_all();

    sleep_ms(2000);

    press_enter_to_continue();

    // Initialise the Wi-Fi chip
    printf("WiFi HW init\n");
    if (cyw43_arch_init()) {
        printf("WiFi init failed\n");
        wifi_status = -2;
    } else {
        printf("WiFi init OK\n");
        wifi_status = 0;
    }

    // Enable wifi station -- IT HANGS HERE
    cyw43_arch_enable_sta_mode();

    printf("Connecting to WiFi...\n");
    if (cyw43_arch_wifi_connect_timeout_ms(WIFI_SSID, WIFI_PASSWORD, CYW43_AUTH_WPA3_SAE_AES_PSK, 30000)) {
        printf("WiFi: failed to connect.\n");
        wifi_status = -3;
    } else {
        printf("WiFi: Connected.\n");
        // Read the ip address in a human readable way
        ip_address = (uint8_t *)&(cyw43_state.netif[0].ip_addr.addr);
        printf("WiFi: IP address %d.%d.%d.%d\n", ip_address[0], ip_address[1], ip_address[2], ip_address[3]);
        wifi_status = 0;
    }


    while (true) {
        printf("Hello, world!\n");
        if (wifi_status == 0) {
            printf("WiFi is connected.\n");
        } else {
            printf("WiFi is not connected: %d.\n", wifi_status);
        }
        sleep_ms(1000);
    }
}
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: ``` ... setting SPI_BUS_CONTROL 0x204b3 write_reg_u32_swap BUS_FUNCTION 0x0=0x204b3 cyw43_read_reg_u32 BUS_FUNCTION 0x0=0x200b3 read SPI_BUS_CONTROL 0x200b3 cyw43_write_reg_u8 BUS_FUNCTION 0x1d=0x10 cyw43_write_reg_u8 BUS_FUNCTION 0x4=0x99 cyw43_write_reg_u16 BUS_FUNCTION 0x6=0xbe backplane is ready cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x8 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x48 ALP is set cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x0 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x18 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x3 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5900003 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc800=0x0 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x1 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5900001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc010=0x3 cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc044=0x0 ``` 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): ``` ... setting SPI_BUS_CONTROL 0x204b3 write_reg_u32_swap BUS_FUNCTION 0x0=0x204b3 cyw43_read_reg_u32 BUS_FUNCTION 0x0=0x200b3 read SPI_BUS_CONTROL 0x200b3 cyw43_write_reg_u8 BUS_FUNCTION 0x1d=0x10 cyw43_write_reg_u8 BUS_FUNCTION 0x4=0x99 cyw43_write_reg_u16 BUS_FUNCTION 0x6=0xbe backplane is ready cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x8 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x48 ALP is set cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000e=0x0 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x18 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xb800=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc800=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x3 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5920003 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc800=0x0 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0xc408=0x1 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1810 cyw43_read_reg_u8 BACKPLANE_FUNCTION 0xc408=0xd5920001 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc010=0x3 cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xc044=0x0 Version: 7.95.49 (2271bb6 CY) CRC: b7a28ef3 Date: Mon 2021-11-29 22:50:27 PST Ucode Ver: 1043.2162 FWID 01-c51d9400 writing 224192 bytes to 0x0 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x0 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x80 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x100 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x180 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x2 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x200 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x280 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x3 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x300 done dnload; dt = 84994 us; speed = 2637 kbytes/sec writing 744 bytes to 0x7fd14 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x7 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000a=0x780 done dnload; dt = 591 us; speed = 1258 kbytes/sec cyw43_write_reg_u32 BACKPLANE_FUNCTION 0xfffc=0xff4500ba cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000c=0x18 cyw43_write_reg_u8 BACKPLANE_FUNCTION 0x1000b=0x1800 ... ``` The code is fairly generic/basic: ```C int main() { int wifi_status = -1; uint8_t *ip_address = NULL; stdio_init_all(); sleep_ms(2000); press_enter_to_continue(); // Initialise the Wi-Fi chip printf("WiFi HW init\n"); if (cyw43_arch_init()) { printf("WiFi init failed\n"); wifi_status = -2; } else { printf("WiFi init OK\n"); wifi_status = 0; } // Enable wifi station -- IT HANGS HERE cyw43_arch_enable_sta_mode(); printf("Connecting to WiFi...\n"); if (cyw43_arch_wifi_connect_timeout_ms(WIFI_SSID, WIFI_PASSWORD, CYW43_AUTH_WPA3_SAE_AES_PSK, 30000)) { printf("WiFi: failed to connect.\n"); wifi_status = -3; } else { printf("WiFi: Connected.\n"); // Read the ip address in a human readable way ip_address = (uint8_t *)&(cyw43_state.netif[0].ip_addr.addr); printf("WiFi: IP address %d.%d.%d.%d\n", ip_address[0], ip_address[1], ip_address[2], ip_address[3]); wifi_status = 0; } while (true) { printf("Hello, world!\n"); if (wifi_status == 0) { printf("WiFi is connected.\n"); } else { printf("WiFi is not connected: %d.\n", wifi_status); } sleep_ms(1000); } } ```
peterharperuk commented 2026-08-11 06:25:20 -05:00 (Migrated from github.com)

I just used iperf built for riscv and it connected ok. Although I wasn't using VSCode

When using the same application code and target_link_libraries, I see these messages (and eventually IP address and things seeminly working):

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 just used iperf built for riscv and it connected ok. Although I wasn't using VSCode > When using the same application code and target_link_libraries, I see these messages (and eventually IP address and things seeminly working): 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
peterharperuk commented 2026-08-11 13:37:16 -05:00 (Migrated from github.com)

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.

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.
cpg commented 2026-08-11 13:39:13 -05:00 (Migrated from github.com)

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?

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?
peterharperuk commented 2026-08-11 14:00:00 -05:00 (Migrated from github.com)

No - you need a debugger. Don't worry about it - I've almost certainly reproduced your problem.

No - you need a debugger. Don't worry about it - I've almost certainly reproduced your problem.
cpg commented 2026-08-18 08:06:02 -05:00 (Migrated from github.com)

Great job @peterharperuk and @will-v-pi!

I would like to use and verify the fix.

In the releases of the pico-sdk I 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.

Great job @peterharperuk and @will-v-pi! I would like to use and verify the fix. In the releases of the `pico-sdk` I 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.
will-v-pi commented 2026-08-18 08:11:29 -05:00 (Migrated from github.com)

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

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
cpg commented 2026-08-18 18:23:20 -05:00 (Migrated from github.com)

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!

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!
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk#3118
No description provided.