Hi @youngSheldon ,
I also use the SDK demo to test this feature:
evkmimxrt1010_gpt_timer
The code is like this:
int main(void)
{
uint32_t gptFreq;
gpt_config_t gptConfig;
/* Board pin, clock, debug console init */
BOARD_ConfigMPU();
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitDebugConsole();
PRINTF("\r\n ===================GPT demo begin after reset!===================");
CLOCK_EnableClock(kCLOCK_Gpt2);
PRINTF("\r\n GPT CR = %x", (GPT2->CR & 0x1c0));
GPT_GetDefaultConfig(&gptConfig);
/* Initialize GPT module */
GPT_Init(EXAMPLE_GPT, &gptConfig);
/* Divide GPT clock source frequency by 3 inside GPT module */
GPT_SetClockDivider(EXAMPLE_GPT, 3);
/* Get GPT clock frequency */
gptFreq = EXAMPLE_GPT_CLK_FREQ;
/* GPT frequency is divided by 3 inside module */
gptFreq /= 3;
/* Set both GPT modules to 1 second duration */
GPT_SetOutputCompareValue(EXAMPLE_GPT, kGPT_OutputCompare_Channel1, gptFreq);
/* Enable GPT Output Compare1 interrupt */
GPT_EnableInterrupts(EXAMPLE_GPT, kGPT_OutputCompare1InterruptEnable);
/* Enable at the Interrupt */
EnableIRQ(GPT_IRQ_ID);
PRINTF("\r\nPress any key to start the example");
GETCHAR();
/* Start Timer */
PRINTF("\r\nStarting GPT timer ...");
GPT_StartTimer(EXAMPLE_GPT);
while (true)
{
/* Check whether occur interupt and toggle LED */
if (true == gptIsrFlag)
{
PRINTF("\r\n GPT interrupt is occurred !");
gptIsrFlag = false;
PRINTF("\r\n GPT CR[CLKSRC] value before software reset !");
PRINTF("\r\n GPT CR = %x", (GPT2->CR & 0x1c0));
NVIC_SystemReset();
}
else
{
// __WFI();
}
}
}
The printf log is:

So, really need to remove :
A software reset does not affect the CLKSRC bit.
I already report it internally, it will be fixed in the next RT1010RM version.
Thanks a lot for your contribution.
Best Regards,
Kerry