-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Broadcom pi zero2w neopixel misbehaving/crash fix #7570
Conversation
These changes result in working neopixel functionality. I've tested on both the zero2w and the pi4b (The 4b didn't exhibit the original issue) and the boards now behave properly with 1 to 30 pixels and the board hanging no longer occurs. Remove mod that didn't help during testing Restoring back to original structure Replace 2 microsecond delay w/deterministic loop Remove unneded check for empty queue Put transmit delay outside loop so Queue is used Make sure last transmission is complete
I just tested this on a zero w rather than the zero2w and it works but it looks like the code is getting stuck more frequently than the other tested board in the loop that checks for an empty queue. I'm not sure that's a problem if I reduce the loop abort counter but I want to test on the three models I have. I'll update once I've finished testing. |
Tested on 4b, zero2w and zero w. Runs without glitches or crashes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use &&
in your conditions instead of &
. &
is a bitwise test and &&
is boolean logic.
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
So I misunderstood what edit: It doesn't look like that last memory barrier was needed either.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
These changes fix #5947. I've tested on both the zero2w and the pi4b (The 4b didn't exhibit the original issue) and the boards now behave properly with 1 to 30 pixels. I've run a 30 pixel animation on the zero2w for 8+ hours without a hang.
Original corrupted rgb transmission:
Early Fix, not using transmission queue:
This PR: