Open 22chrs opened 4 weeks ago
Done on a teensy 4.1
Update. Same jitter also when using ssilverman/QNEthernet@^0.29.1 lib for ethernet. 😭
Not very likely that the timer is used twice since this whould mess up TeensyStep completely. However, they might use another timer running at the same interrupt priority. Thus, the TeensyStep timer would be blocked while they serve their interrupt routine.
You can try to increase the priority of the TeensyStep timer in its constructor (file: Teensy4/TMR/TMR.h , starting at line 184). Add the priority line as shown below. Smaller numbers (multiples of 16) increase priorty, default is 128.
//---------------------------------------------------------------------------
template <unsigned moduleNr>
TMRModule<moduleNr>::TMRModule()
{
//Serial.printf("TMRModule cstr %p %d\n", this, moduleNr);
attachInterruptVector(tmrIRQs[moduleNr], ISR);
NVIC_ENABLE_IRQ(tmrIRQs[moduleNr]);
NVIC_SET_PRIORITY(tmrIRQs[moduleNr], 32); //<- set timer priority
};
//---------------------------------------------------------------------------
Thank you! I will try and report. 🙏
10/10. Runs without any special incidents. Have you ever considered feeding an AI with your knowledge? 😬
Maybe you can help me giving a hint where to start finding and solving my problem. When using [NativeEthernet](https://github.com/vjmuzik/NativeEthernet -> this has as dependency: https://github.com/vjmuzik/FNET) for a websocket (via arduinoWebsocket lib) connection I get jitter when a stepper moves. Maybe a timer is used twice? The jitter is coming from the NativeEthernet I think.
after this is done once, we have the jitter in the system :(