nrf-rs / microbit

A Rust crate for BBC micro:bit development
BSD Zero Clause License
255 stars 60 forks source link

microbit/microbit-common/src/display/nonblocking ⸺ defect in timings? #131

Open bravequickcleverfibreyarn opened 4 months ago

bravequickcleverfibreyarn commented 4 months ago

I went through example regard using nonblocking display — https://github.com/nrf-rs/microbit/blob/main/examples/display-nonblocking/src/main.rs.

I noticed that some LEDs shine very dimmly in their core that should not. This is permanent for pattern being displayed. Since I verified using blocking API there is no issue with LEDs on this, I suppose some wrong.

My unqualified guess is there is some interferrence regard timing.

From doc.

This uses a 6ms period to light each of the three internal LED rows, so that the entire display is updated every 18ms.

I tried some interrupt priorities and RTC0 frequencies variations but issue is resistable to this.

Sample of displaying letter E; RTC0 with 100 prescaler, NVIC priority 32, TIMER2 NVIC priority 64

IMG_20240219_205537332

So I wonder if there is bug somewhere seeking for remendy.

mattheww commented 4 months ago

It seems likely that this is the same as #108.

If so, it's fixed but there hasn't been a release since the fix went in.

bravequickcleverfibreyarn commented 4 months ago

Yes, it's same.

BartMassey commented 4 months ago

@lulf Should I make a release based on this merged PR plus other stuff?