Hey, Recently while i use MCUXpressoIDE & MCUXpresso Config Tools to generate GPT1 & GPT2 configurations automatically for my project, I found out there may be something incorrect about `compare value`, showing as follows:
And my IRQ shows like this:
```C
extern "C" void GPT1_IRQHandler()
{
/* Clear interrupt flag.*/
GPT_ClearStatusFlags(GPT1_PERIPHERAL, kGPT_OutputCompare1Flag);
TOGGLE(GPIO_AD_B1_06);
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
extern "C" void GPT2_IRQHandler()
{
/* Clear interrupt flag.*/
GPT_ClearStatusFlags(GPT2_PERIPHERAL, kGPT_OutputCompare1Flag);
TOGGLE(GPIO_AD_B1_07);
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
```
Then I captured the pin logic, like this:
Then I realized that same thing happened before while i use the same processor and same gpt, which is that the actual compare value is 1 more than its setting value, while it cannot be set as zero in MCUXpresso Config Tools(showing as follow). So it leads to one more microsecond for every microseconds.(I guess.)
So, I am a little confused. Am I right about this?
Hi
Thank you for your feedback, could you please let me know which MCU and the SDK version you are using?
Regards
Daniel