Dear NXP support,
When I checked RTC_CLKOUT with FRDM-KW36 board, it did not work normally in low power mode.
The test environment and results are as follows.
Board : FRDM-KW36
Source : frdmkw36_wireless_examples_bluetooth_hrs_freertos + frdmkw36_driver_examples_rtc
Modified Source:
#define mNoOfPinsDisabledInLowPower_c (15) //Modify
const gpioPinId_t maPinsDisabledInLowPower[mNoOfPinsDisabledInLowPower_c]={
{gpioPort_A_c, 16},
{gpioPort_A_c, 17},
{gpioPort_B_c, 1},
{gpioPort_B_c, 2},
//{gpioPort_B_c, 3}, //Modify
{gpioPort_C_c, 0},
{gpioPort_C_c, 1},
{gpioPort_C_c, 3},
{gpioPort_C_c, 6},
{gpioPort_C_c, 7},
{gpioPort_C_c, 16},
{gpioPort_C_c, 17},
{gpioPort_C_c, 18},
{gpioPort_C_c, 19},
{gpioPort_A_c, 0},
{gpioPort_A_c, 1}
};
void BOARD_InitPins(void) {
CLOCK_EnableClock(kCLOCK_PortB); /* Port B Clock Gate Control: Clock enabled */
PORT_SetPinMux(PORTB, PIN3_IDX, kPORT_MuxAlt7); /* PORTB3 (pin 19) is configured as PTB3 */
}
void BOARD_ReInitPins(void)
{
BOARD_InitPins();
}
void BOARD_WarmbootCb()
{
...
BOARD_ReInitPins();
}
void BOARD_RTCInit(void)
{
rtc_datetime_t date;
rtc_config_t rtcConfig;
BOARD_InitPins();
RTC_GetDefaultConfig(&rtcConfig);
RTC_Init(RTC, &rtcConfig);
#if (defined(EXAMPLE_CAP_LOAD_VALUE) && EXAMPLE_CAP_LOAD_VALUE)
#if (defined(FSL_FEATURE_RTC_HAS_OSC_SCXP) && FSL_FEATURE_RTC_HAS_OSC_SCXP)
/* Change the RTC oscillator capacity load value. */
RTC_SetOscCapLoad(RTC, EXAMPLE_CAP_LOAD_VALUE);
#endif /* FSL_FEATURE_RTC_HAS_OSC_SCXP */
#endif /* EXAMPLE_CAP_LOAD_VALUE */
/* Select RTC clock source */
RTC_SetClockSource(RTC);
/* Set a start date time and start RT */
date.year = 2014U;
date.month = 12U;
date.day = 25U;
date.hour = 19U;
date.minute = 0;
date.second = 0;
/* RTC time counter has to be stopped before setting the date & time in the TSR register */
RTC_StopTimer(RTC);
/* Set RTC time to default */
RTC_SetDatetime(RTC, &date);
/* Enable RTC alarm interrupt */
RTC_EnableInterrupts(RTC, kRTC_AlarmInterruptEnable);
/* Enable at the NVIC */
EnableIRQ(RTC_IRQn);
/* Start the RTC time counter */
RTC_StartTimer(RTC);
}
void main_task(uint32_t param)
{
...
LED_Init();
BOARD_RTCInit();
}
1) cPWR_DeepSleepMode 4/5/8
=> Not working
2) cPWR_DeepSleepMode 3
2-1) Idle state
=> 1Hz output

2-2) Advertising state
==> 1 Hz output, square wave not normal

Please check if 1Hz square wave can be used through RTC_CLKOUT in low power mode.
Best regards,
Ayden Hong