2018-02-19 03:55 AM
2018-02-19 04:15 AM
Probably because now the loopdelay (which is far from being precise) causes the main loop to miss the 1ms window of ((
TimingDelay % TIMER
)==0)?Try (TimingDelay >= TIMER) instead.
And then throw away the whole program and start from scratch, rethinking what do you really want to achieve, and avoiding loopdelays.
JW
2018-02-19 05:25 AM
I'm tryed it.. I'm begun from this.. Sorry, I'm probably understand - the whole point is this:
while ((TIM6->CR1 & TIM_CR1_CEN) != 0);
Try (TimingDelay >= TIMER) instead.