CLK001 configuration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Concerning the RTC tab of the CLK001 app that enables the hibernation domain.

Tab configuration
The hibernation mode check box and ultra low power oscillator are selected in the configuration.

After executing DAVE_Init() and starting the RTC module by using RTC001_Enable() it is expected that the 32 kHz crystal will be enabled.
Is this a correct configuration and functionality to expect for this use case?
0 Likes
3 Replies
Georg_Huba
Employee
Employee
The RTC belongs to the hibernate domain therefore the hibernate domain needs to be enabled to use the RTC.
The configuration you described is a correct use case (in this case RTC is not enabled in the configuration UI of RTC001 App).
RTC_Enable() is not required if the RTC is enabled in the configuration UI. See also RTC001_Example1.
0 Likes
Not applicable
RTC001_Example1 currently uses an old version of the CLK001 app, updating the example to the latest version 1.0.22 enabled the 32 kHz crystal.
Now that the crystal is running I would like to set the microcontroller in hybernate mode. Using the RTC001_Example1 example, the following code does not accomplish that goal as expected.

int main(void)
{
// Initialization of DAVE Apps
DAVE_Init();

SCU_POWER->PWRSET |= SCU_POWER_PWRSET_HIB_Msk; // Enable hibernation domain
SCU_RESET->RSTCLR |= SCU_RESET_RSTCLR_HIBRS_Msk; // Release reset of hibernate domain
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_WKPEN_Msk; // Wake-up on negative edge enable

SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_RCS_Msk; // Set RTC clock source to 12kHz crystal
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_STDBYSEL_Msk; // Set standby clock source to 12kHz crystal
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_GPI0SEL_Msk; // Set HIP_IO_0 to GPIO
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_HIB_Msk; // External hibernate request active

while(1)
{
}
return 0;
}
0 Likes
oreste
Employee
Employee
Welcome! 50 replies posted 25 replies posted
Hi Doug,
I know that an new app (POW001) is going to be released to handle MCU power states including hibernate state.
This app is designed to work together with RTC001.
I am going to check internally when it will be released exactly.
Best Regards
Oreste


Doug wrote:
RTC001_Example1 currently uses an old version of the CLK001 app, updating the example to the latest version 1.0.22 enabled the 32 kHz crystal.
Now that the crystal is running I would like to set the microcontroller in hybernate mode. Using the RTC001_Example1 example, the following code does not accomplish that goal as expected.

int main(void)
{
// Initialization of DAVE Apps
DAVE_Init();

SCU_POWER->PWRSET |= SCU_POWER_PWRSET_HIB_Msk; // Enable hibernation domain
SCU_RESET->RSTCLR |= SCU_RESET_RSTCLR_HIBRS_Msk; // Release reset of hibernate domain
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_WKPEN_Msk; // Wake-up on negative edge enable

SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_RCS_Msk; // Set RTC clock source to 12kHz crystal
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_STDBYSEL_Msk; // Set standby clock source to 12kHz crystal
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_GPI0SEL_Msk; // Set HIP_IO_0 to GPIO
SCU_HIBERNATE->HDCR |= SCU_HIBERNATE_HDCR_HIB_Msk; // External hibernate request active

while(1)
{
}
return 0;
}
0 Likes