Well it works, network-wise. But there are those extra peaks that have been since the start. Let's see if I can remove them. Welcome StepGen3

This commit is contained in:
Hakan Bastedt
2024-03-21 16:28:55 +01:00
parent 8f26a10224
commit 30a9f10c7b
2 changed files with 19 additions and 17 deletions

View File

@@ -21,12 +21,13 @@ public:
uint32_t pulseTimerChan;
HardwareTimer *startTimer; // Use timers 10,11,13,14
uint8_t dirPin;
PinName dirPinName;
PinName stepPin;
uint32_t Tjitter = 400; // Longest time from IRQ to handling in handleStepper, unit is microseconds
uint64_t dbg;
const uint16_t t2 = 5; // DIR is ahead of PUL with at least 5 usecs
const uint16_t t3 = 3; // Pulse width at least 2.5 usecs
const uint16_t t4 = 3; // Low level width not less than 2.5 usecs
const uint16_t t3 = 5; // Pulse width at least 2.5 usecs
const uint16_t t4 = 5; // Low level width not less than 2.5 usecs
const float maxAllowedFrequency = 1000000 / float(t3 + t4) * 0.9; // 150 kHz for now
public: