/* param base SNVS peripheral base address param config Pointer to the user's SNVS configuration structure.  */
void SNVS_HP_RTC_Init(SNVS_Type *base, const snvs_hp_rtc_config_t *config)
/* param base SNVS peripheral base address param config Pointer to the user's SNVS configuration structure.  */
void SNVS_HP_RTC_Init(SNVS_Type *base, const snvs_hp_rtc_config_t *config)
{
    assert(config != NULL);
    SNVS_HP_Init(base);
    base->HPCOMR |= SNVS_HPCOMR_NPSWA_EN_MASK;
    base->HPCR = (base->HPCR & ~SNVS_HPCR_PI_FREQ_MASK) | SNVS_HPCR_PI_FREQ(config->periodicInterruptFreq);
    if (config->rtcCalEnable)
    {
        base->HPCR = (base->HPCR & ~SNVS_HPCR_HPCALB_VAL_MASK) | SNVS_HPCR_HPCALB_VAL(config->rtcCalValue);
        base->HPCR |= SNVS_HPCR_HPCALB_EN_MASK;
    }
}