I did notice that the timer has an delay. I set the TIMG8 to trigger on 4ms, but I'm getting interrupts on 4,013ms. I'm using ULPCLK as clock source at 40Mhz with 8 of divider, so getting 5Mhz. My ULPCLK is derivate from SYSOSC (32Mhz) and PLL getting an CPUCLK of 80Mhz. I did measured ULPCLK and I'm getting 39,96Mhz, so with this clock error the timer should trigger on 4,0038ms. So I have an error of 10us.
I'm using A14 to measure the clock and A0 to measure the TIMG8 trigger, and an oscilloscope (100Mhz 1GSa/s) to measure the frequency
- This MCU has an delay between reach the timer counter and call the IRQ handler? even using an standalone project just with this timer an using it on the highest priority.
- The pins I'm using could cause this delay?
- I'm measuring this delay on a standalone project and on the final project that has many timers running, adc, freertos and much more, the error still the same. What could be the root cause of this error?