What I often do in cases like this is increment an error count and keep going. One error in a while is not a good reason for a real time system to quit, if it can keep going. We just want to know it happened and see how often and what it correlates with. My Pico GPS program makes one counted error during startup and then never does again, so I can decide whether that is worth fixing or just ignore it. Reminds me of an old 4 stroke outboard motor that would quit if the oil got low as an equipment protection feature. The newer version of that same motor would sound a buzzer and keep going. It should be up to the captain to decide when to shut the motor down, he just needs to be given the information. Maybe avoiding the rocks is worth risking engine damage. If the ELS misses a count now and then the threads are still likely to make spec. During feeding it matters even less. Quitting on error will probably ruin the threads or make surface defects in the feed.
Stepper motors can usually go much faster than they can cold-start. It's often shown in motor performance graphs. Deciding the max RPM based on available torque is probably more useful than cold-start RPM, but that's a choice. The spindle will slow the ramping up to speed.
Graphical displays eat a lot of cycles and time, I've had many issues with that. Having a second core could help. On the Arduino I didn't have a second core so the display code had to be partitioned into many smaller updates so they could be interleaved with the critical ops. USB activity, or network activity can also make big holes in interrupt latency. Interrupts aren't always the best or simplest solution. It is very hard to know the maximum time the interrupts get disabled in a sea of libraries. And it may change with the next update.
Printing when there are errors in a real time system often causes cascades of more errors. Printing is very expensive and disruptive to the real time system. Sometimes we have to write our own simpler printing routines to get better control over things like max interrupt latency. Many libraries just disable interrupts way too long. Most programmers don't understand real time so they don't write libraries to support it properly.
Can you do smaller TFT writes, or is it buffering and rewriting the whole display?
Stepper motors can usually go much faster than they can cold-start. It's often shown in motor performance graphs. Deciding the max RPM based on available torque is probably more useful than cold-start RPM, but that's a choice. The spindle will slow the ramping up to speed.
Graphical displays eat a lot of cycles and time, I've had many issues with that. Having a second core could help. On the Arduino I didn't have a second core so the display code had to be partitioned into many smaller updates so they could be interleaved with the critical ops. USB activity, or network activity can also make big holes in interrupt latency. Interrupts aren't always the best or simplest solution. It is very hard to know the maximum time the interrupts get disabled in a sea of libraries. And it may change with the next update.
Printing when there are errors in a real time system often causes cascades of more errors. Printing is very expensive and disruptive to the real time system. Sometimes we have to write our own simpler printing routines to get better control over things like max interrupt latency. Many libraries just disable interrupts way too long. Most programmers don't understand real time so they don't write libraries to support it properly.
Can you do smaller TFT writes, or is it buffering and rewriting the whole display?