jlopez2022
Member
I programmed a Teensy 4.1 using Timer1 at the TimerOne library. It is easy to manage and works very well bu goes 2x faster than expected.
I have seen at the TimerOne.h file at the setPeriod) function that it is multiplied the microseconds by 0.0000005f and perhaps should be 0.0000010f
I have seen at the TimerOne.h file at the setPeriod) function that it is multiplied the microseconds by 0.0000005f and perhaps should be 0.0000010f
Code:
void setPeriod(unsigned long microseconds) __attribute__((always_inline)) {
uint32_t period = (float)F_BUS_ACTUAL * (float)microseconds * 0.0000005f;