I have managed a "fix" - change the compare pin mode to "set on compare", force it with FO2/FO2, then change back to "clear on compare":
void gpt2_isr()
{
uint32_t srtmp = GPT2_SR;
// GPT2_SR &= 0x3F; // clear all set bits
if (srtmp &...
I'm working on using a 4.1 to drive RC servo using PWM. For simplicity I would like to use GPT2, with COMPARE_1 resetting the count, and COMPARE_2 and COMPARE_3 giving me 2 channels of PWM. I have used manitou48's "gptisr3" as a starting point...