S7G2_SK_timer.zip

GPT0 is generating a 1ms PWM, 50% duty

GPT1 is triggered from the PWM rising edge.

GPT1 generates a 1us interrupt, handled by the callback function

In the callback, GPT1 stops itself from counting and resets itself, waiting for the next PWM rising edge.

PWM is on GPT0 GTIOCB0 - P511

GPT1 callback toggles an I/O pin in the callback, P411