8000 Status LED blink irregular on RP2040 · Issue #7361 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
8000

Status LED blink irregular on RP2040 #7361

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”, 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
Neradoc opened this issue Dec 19, 2022 · 1 comment · Fixed by #7893
Closed

Status LED blink irregular on RP2040 #7361

Neradoc opened this issue Dec 19, 2022 · 1 comment · Fixed by #7893
Assignees
Labels
bug rp2040 Raspberry Pi RP2040
Milestone

Comments

@Neradoc
Copy link
Neradoc commented Dec 19, 2022

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.

@Neradoc Neradoc added bug rp2040 Raspberry Pi RP2040 labels Dec 19, 2022
@Neradoc
Copy link
Author
Neradoc commented Dec 19, 2022

Git bisect leads to #7201

@tannewt tannewt added this to the 8.x.x milestone Dec 20, 2022
dhalbert pushed a commit that referenced this issue Apr 24, 2023
Don't idle from main if we scheduled an interrupt for 0 ticks in
the future.

Have RP2040 detect wakes that happen between setting the timer and
the idle call.

Fixes #7361
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rp2040 Raspberry Pi RP2040
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0