Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CPU goes to 100% in strandtest.py with PCM #547

Open
maldavis opened this issue Nov 11, 2024 · 0 comments
Open

CPU goes to 100% in strandtest.py with PCM #547

maldavis opened this issue Nov 11, 2024 · 0 comments

Comments

@maldavis
Copy link

When attempting to use PCM in strandtest.py by setting:
LED_PIN = 21

The LEDs display as expected but upon termination, the python process for strandtest.py goes to 100% CPU, does not terminate with CTRL-C, and must be killed. With some debugging, I find that the CPU goes to 100% in PixelStrip._cleanup(). With further code review, this line in ws2811_fini() appears to be a good suspect:
while (!(pcm->cs & RPI_PCM_CS_TXE)) ; // Wait till TX FIFO is empty

I'd guess that the RPI_PCM_CS_TXE bit is never set or something else has cleared it.

strandtest.py works as expected and terminates normally with PWM (LED_PIN = 18). PWM works for me, so I don't need a fix but I thought others might have the same experience and want to know.

Running a RPi 4B with Raspbian GNU/Linux 11 (bullseye), Linux 6.1.21-V8+

Thx

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant