Marlin 2.0.x - fix LPC1768 stepper hang and limit maximum stepper ISR spacing #7799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The timer mod eliminates a 3 second pause in printing. This was caused by setting the MR0 match register to a value less than the timer counter. When that happened the counter had to overflow before the match could be made. The time to do the overflow is about 3 seconds. The fix is to check AFTER MR0 is written that it's greater than the counter. If not then the counter is written with a value that will result in an almost immediate interrupt.
The SPLIT function is being enabled in the stepper ISR code. It runs no matter what options are selected.
The reasons the SPLIT function is being enabled are:
a) Guarantee detection of the 5mS BLTouch pulse by making sure at least two ISRs are run within the 5mS pulse.
b) By running this all the time, 16 bit timers can be used to generate the stepper interrupts. This is a help to the STM32 folks.