Duet3D / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
944 stars 535 forks source link

New PWM code in RRF 3.5 doesn't allow PWM frequencies as low as 3.4 did #854

Closed dc42 closed 1 year ago

dc42 commented 1 year ago

Duet Forum Discussion Thread

https://forum.duet3d.com/topic/32487/3-5-0-beta-3-minimum-pwm-frequency

What happened?

The minimum PWM frequency on the 6HC used to be about 1.6Hz on outputs that use the PWM peripheral. in 3.5.0-beta3 it is about 3Hz.

dc42 commented 1 year ago

Implement a probably fix in CoreN2G.

T3P3 commented 1 year ago

tested on mini 5+ with latest build. Using: M950 P0 C"out5" Q1 then M42 P0 S0.5 resulted in approx 1Hz flashing of LED connected to out5.

dc42 commented 1 year ago

Unfortunately that's not a valid test, because the code change only affects boards using the SAM4E, SAME7x or SAM4S, and it only affects those output ports that use the PWM peripheral. For example, on the 6HC it affects laser/vfd, out5, out2, out8, out1, out0.

T3P3 commented 1 year ago

OP on the forum has confirmed fixed

Pourya-3deo commented 6 months ago

I have the same issue, I need 10 hz frequency but the lowest I can get is 17.88 Hz, I used an oscilloscope to measure.

dc42 commented 6 months ago

@Pourya-3deo that is a different issue, it's a limitation of the PWM-capable ports that are drive by a timer/counter.