While adding MICROPY_HW_LED_STATUS on the Raspberry Pico I noticed that it didn't blink every 5 seconds. I did some tests on other boards and different types of satus LEDs, and it seems that it's a RP2040 bug.
It looks like the pico W is doing it correctly (and it already had the status LED defined).
Since staring at a LED for minutes to see when it blinks is not a lot of fun, I added a serial_write here, and it rarely blinks and seems to only react to the USB host doing something, as these happened simultaneously on 2 boards, whatever MacOS is doing on the USB bus.
|
pattern_start = supervisor_ticks_ms32(); |
Feather RP2040:
[00:00:00.003] Press any key to enter the REPL. Use CTRL-D to reload.
[00:08:16.008] Pattern start
[00:01:04.865] Pattern start
[00:09:00.385] Pattern start
[00:00:41.265] Pattern start
Pico:
[00:00:00.004] Press any key to enter the REPL. Use CTRL-D to reload.
[00:09:04.928] Pattern start
[00:01:04.817] Pattern start
[00:09:00.593] Pattern start
[00:00:40.990] Pattern start
I did other tests on the Feather with more prints leading to more random timings between blinks.
While adding
MICROPY_HW_LED_STATUSon the Raspberry Pico I noticed that it didn't blink every 5 seconds. I did some tests on other boards and different types of satus LEDs, and it seems that it's a RP2040 bug.It looks like the pico W is doing it correctly (and it already had the status LED defined).
Since staring at a LED for minutes to see when it blinks is not a lot of fun, I added a
serial_writehere, and it rarely blinks and seems to only react to the USB host doing something, as these happened simultaneously on 2 boards, whatever MacOS is doing on the USB bus.circuitpython/main.c
Line 676 in 9629a0c
Feather RP2040:
Pico:
I did other tests on the Feather with more prints leading to more random timings between blinks.