10000 Communication with cyw43 fails at system clock speeds <= 60MHz · Issue #1392 · raspberrypi/pico-sdk · GitHub
[go: up one dir, main page]

Skip to content

Communication with cyw43 fails at system clock speeds <= 60MHz #1392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub&rdquo 8000 ;, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MichaelBell opened this issue May 25, 2023 · 2 comments
Closed

Communication with cyw43 fails at system clock speeds <= 60MHz #1392

MichaelBell opened this issue May 25, 2023 · 2 comments
Assignees
Milestone

Comments

@MichaelBell
Copy link
Contributor

It's sometimes useful to run the RP2040 quite slowly to reduce power consumption. I'm not sure whether it is reasonable to expect Wifi to continue to work at low clock speeds - but I think it is reasonable to at least expect to be able to use the CYW43 GPIO.

However, at around 60MHz and below setting/reading the GPIO from the CYW43 doesn't work. This means you can't determine whether VBUS is present, and can't control the LED.

A simple repro is to add set_sys_clock_48mhz() to the top of the pico_w blink example.

index 149b477..600e2a2 100644
--- a/pico_w/wifi/blink/picow_blink.c
+++ b/pico_w/wifi/blink/picow_blink.c
@@ -8,6 +8,7 @@
 #include "pico/cyw43_arch.h"

 int main() {
+    set_sys_clock_48mhz();
     stdio_init_all();
     if (cyw43_arch_init()) {
         printf("Wi-Fi init failed");
@mvds00
Copy link
Contributor
mvds00 commented Oct 23, 2023

WiFi works flawlessly for us with the Pi Pico running at 12 MHz from xosc. Set clock divider at 1 and spi program spi_gap01_sample0. Running at 48 MHz (to enable USB stdio) clock divider 2 and spi program spi_gap0_sample1 can be used, IIRC.

@kilograham kilograham modified the milestones: 1.6.1, 1.6.0 May 19, 2024
@kilograham kilograham modified the milestones: 1.6.0, 1.6.2, 1.6.1 Jul 21, 2024
@peterharperuk peterharperuk modified the milestones: 1.6.1, 1.6.2 Jul 24, 2024
@kilograham kilograham modified the milestones: 1.6.2, 2.0.0 Aug 8, 2024
@peterharperuk
Copy link
Contributor

I seem to be able to be able to use cyw43 to flash the led when running from xosc by calling the new function cyw43_set_pio_clock_divisor(1, 0). I didn't seem to have to set CYW43_SPI_PROGRAM_NAME? Anyway - I think this is resolved now as you shouldn't have to hack the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0