/* Access Password to AER to make access other register enable.  */
xtBoolean RTCWriteEnable(void)
/* Access Password to AER to make access other register enable.  */
xtBoolean RTCWriteEnable(void)
{
    unsigned long i = 0;
    unsigned long ulRetry = 100;
RETRY:
    i = 0;
    xHWREG(RTC_AER) = 0xA965;
    for (i = 0 ; i < 0xFFFFFFFF ; i++)
    {
        xHWREG(RTC_AER) = 0xA965;
        if (xHWREG(RTC_AER) & RTC_AER_ENF)            break;
    }
    if (i == 0xFFFFFFFF)
    {
        ulRetry--;
        if(!ulRetry)
            return xfalse;
        goto RETRY;
    }
    return xtrue;
}