Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3556

Troubleshooting • Comparison of Periodic Processing on RPi4 and RPi5

$
0
0
Hi

I've developed code using a while loop (infinite loop) to handle processing tasks.
When comparing RPi4 and RPi5, I found that both have variations in processing times.
However, RPi5 occasionally experiences significant slowdowns.
On RPi4, the processing frequency remains around 25kHz even at its slowest, but on RPi5, it can drop to about 100Hz.

Below is the graph for RPi4. The x-axis represents the number of processed cycles, and the y-axis shows the processing frequency (in Hz).
RPi4.png
Similarly, here are the results for RPi5. The average frequency for data below 1000Hz is 184Hz.
RPi5.png
The processing involves reading data via GPIO and SPI communication, performing calculations, and outputting data through GPIO and SPI.
Why does RPi5 experience these slowdowns, and are there any solutions to this issue?

The libraries used are as follows:
RPi4: bcm2835.h (C language)
RPi5: GPIOZERO (Python)

Thank you for your assistance.

Statistics: Posted by ShinYamada — Wed Oct 23, 2024 5:08 am



Viewing all articles
Browse latest Browse all 3556

Trending Articles