Hi @jimmyli
I just tested it on my end.
It can work.
According to the RM.
There are two important points to note.
1. You must independently enable the field by writing 1 to SUBSECOND_CTRL[SUB_SECOND_CNT_EN] after enabling RTC.CTRL[CLKOUT] (see chip-specific RTC_SUBSYSTEM for more information) to select the 1 Hz clock output.
2.In RTC.CTRL[CLKO_DIS] you should select The selected clock is output to other peripherals. 0b
This is my test code.
IRTC_GetDefaultConfig(&irtcConfig);
irtcConfig.disableClockOutput = false;
if (IRTC_Init(RTC, &irtcConfig) == kStatus_Fail)
{
return 1;
}
PRINTF("RTC Example START:\r\n");
RTC->CTRL &= (uint16_t)(~RTC_CTRL_CLKOUT_MASK);
RTC->CTRL |= RTC_CTRL_CLKOUT((uint16_t)kIRTC_ClkoutFine1Hz);
IRTC_EnableSubsecondCounter(RTC, true);
uint32_t subSecond_cnt = 0;
while(1){
subSecond_cnt = IRTC_GetSubsecondCount(RTC);
PRINTF("subSecond Counter is %d.\r\n",subSecond_cnt);
//intervals time
uint32_t i,j;
for(i=0;i<6534;i++)
for(j=0;j<6232;j++){
__NOP();
}
}
for (;;)
{
}

BR
Harry