Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Today I suddenly wanted to see what the pulse frequency of the RP2040 can be and what the pulse quality is.
My RP2040 is overclocked to 250Mhz, and the network port and webui (in littleflash) are enabled by default.
The test conditions are single-axis reciprocating motion, such as the G0 X2500 F10000 and G0 X0 F10000
The pulse width of the default firmware is 5us, and the maximum frequency I measured was 153.8Khz;
The minimum pulse width that can be set on the RP2040 is 1us, and the maximum frequency I measured is about 400Khz;
I found in settings.c that the minimum pulse width is limited by hal.step_us_min, and the RP2040 defaults to 1us, so I modified it to 0.5 and compiled the firmware.
At a pulse width of 0.5us, the maximum frequency I measured was about 500Khz.
In the above tests, the pulses were kept clean and sharp without jitter.
I found an interesting phenomenon that the low level time was always 1.5us at different pulse widths.
So we can get, 1000/(5+1.5)=153.8K; 1000/(1+1.5)=400K; 1000/(0.5+1.5)=500K.
If this low level time is variable, the maximum pulse frequency can be significantly increased, such as 1000/(0.6+0.6)=833.3K
If this frequency can be reached, then this is almost the top speed of pulse frequency generation using MCU.
Beta Was this translation helpful? Give feedback.
All reactions