You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration: ESP32 Dev Kit
The comments in the README and in the source code say that the iBus should be polled at least once per 1 ms.
When a timer is used the library uses the following code:
The code uses F_CPU, the CPU clock, to calculate a prescaler value that will give a 1ms timer.
In fact the clock source of the timers is APB_CLK (typically 80 MHz) and not the CPU clock and the code above will only give a 1ms timer if the CPU clock is 80Mhz.
By default in Arduino IDE the cpu clock is 240Mhz, the prescaler will be 240 and the timer will fire every 3ms
With the code above, the faster is the CPU clock, the slower will be the poll frequency of the iBus. Strange .
A fixed prescaler should be used ?: 80 timer = timerBegin(timerid, 80, true); // defaults to timer_id = 0; divider=80 (1 ms); countUp = true;
The text was updated successfully, but these errors were encountered:
Configuration: ESP32 Dev Kit
The comments in the README and in the source code say that the iBus should be polled at least once per 1 ms.
When a timer is used the library uses the following code:
The code uses F_CPU, the CPU clock, to calculate a prescaler value that will give a 1ms timer.
In fact the clock source of the timers is APB_CLK (typically 80 MHz) and not the CPU clock and the code above will only give a 1ms timer if the CPU clock is 80Mhz.
By default in Arduino IDE the cpu clock is 240Mhz, the prescaler will be 240 and the timer will fire every 3ms
With the code above, the faster is the CPU clock, the slower will be the poll frequency of the iBus. Strange .
A fixed prescaler should be used ?: 80
timer = timerBegin(timerid, 80, true); // defaults to timer_id = 0; divider=80 (1 ms); countUp = true;
The text was updated successfully, but these errors were encountered: