/* Enable wakeup tsc functionand wakeup by the set time.  */
void RTC_EnableWakeUpTsc(uint32_t count)
/* Enable wakeup tsc functionand wakeup by the set time.  */
void RTC_EnableWakeUpTsc(uint32_t count)
{
    while (!(RTC->TSCWKUPCTRL & RTC_TSCWKUPCTRL_WKUPOFF))
    {
    }
    RTC->TSCWKUPCTRL = RTC_TSCWKUPCTRL_WKUPCNF;
    RTC->TSCWKUPCNT = count;
    RTC->TSCWKUPCTRL &= ~(RTC_TSCWKUPCTRL_WKUPCNF);
    while (!(RTC->TSCWKUPCTRL & RTC_TSCWKUPCTRL_WKUPOFF))
    {
    }
    RTC->TSCWKUPCTRL = RTC_TSCWKUPCTRL_WKUPEN;
}