Closed gin66 closed 3 years ago
Problem is, that for step = 1 in the pcnt interrupt (at TEA aka timer=1) the mcpwm interrupt is enabled and in the same cycle at TEP executed. That execution load already the next command and the pause is effectively skipped.
Correct would be, that the mcpwm interrupt takes place one cycle later at TEP.
Fixed in 0.16.0
Measurements by log from CuteCom line timestamps: M1 N A100000 V100 R600000 ...runs for 60s, OK M1 N A100000 V1000 R60000 ...runs for 60s,OK M1 N A100000 V4000 R15000 ...runs for 60s, OK For speed >= 4096us additional pauses are added. M1 N A100000 V4100 R14634 ...runs for 30s ??? M1 N A100000 V5000 R12000 ...runs for 30s ??? M1 N A100000 V10000 R6000 ...runs for 25s ??? M1 N A100000 V12000 R5000 ...runs for 20,5s ??? M1 N A100000 V15000 R4000 ...runs for 32,8s ??? M1 N A100000 V20000 R3000 ...runs for 37s ??? M1 N A100000 V100000 R600 ...runs for 56s ??? M1 N A100000 V100000 R600 ...runs for ~59,5s
All should yield 60s running time.
Stepper runs with V4100 much faster compared to V4000