Skip to content

Status LED blink irregular on RP2040 #7361

@Neradoc

Description

@Neradoc

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.

Metadata

Metadata

Assignees

Labels

bugrp2040Raspberry Pi RP2040

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions