Because the two GPT timers have dedicated interrupts (which you requested) and are 32bit as the IntervalTimer (PIT) you originally used.
Notation means: (modules x channels), modules share one interrupt. -> GPT has two modules, one channel per...
I'm a bit of a noob when it comes to things like this.. I would appreciate it if you could clarify some things....
I notice that you've used the GPT timers as indicated by these lines:
Why have you chosen these instead of using any of the...
Here a biased :) and not necessarily complete list of advantages / drawbacks
+ covers PIT (1x4), GPT(2x1), TMR(4x4), RTC(1x1) and software timers, (TCK32 and TCK64 1x20) with exactly the same API
+ provides periodic and one-shot functionality...
Follow up question; if I do not require interrupts with priorities assigned (say if I have only one interrupt), are there any drawbacks / advantages to using TeensyTimerTool as opposed to good old IntervalTimer?
Each of the channels generates the same interrupt. But the channels maintain ther own interrupt flags. In the ISR one checks which interrupt flag was set and invokes the corresponding callback. See here for the relevant code...
Is keeping track of a bunch of variables storing ints, let's say 5, that are defined at the beginning of the program and are reported periodically to the computer a good way to find memory leaks?
I have verified that the Teensy does not crash by using the try-except block that catches the OSError errno 5 and recreates the pyserial connection. I have seen that the data the Teensy is reporting after that are not random numbers but accurate...
I am maintaining a project that performs long term (weeks/months) communication with a Teensy 4.1 using Python3 and pyserial (version 3.5) that runs on both Ubuntu 22.04 and Raspbian Bullseye (basically various Linux distros).
The pyserial...
Here how your example would look like using the TimerTool:
#include "TeensyTimerTool.h"
using namespace TeensyTimerTool;
volatile bool pauseInterruptPrints = false;
PeriodicTimer timer1(GPT1);
PeriodicTimer timer2(GPT2);
void spam(){
if...