/* retval kStatusSuccess Success to Switch SRAM powered by VBAT. retval kStatus_VBAT_Fro16kNotEnabled Fail to switch SRAM powered by VBAT due to FRO16K not enabled previously.  */
status_t VBAT_SwitchSRAMPowerByLDOSRAM(VBAT_Type *base)
/* retval kStatusSuccess Success to Switch SRAM powered by VBAT. retval kStatus_VBAT_Fro16kNotEnabled Fail to switch SRAM powered by VBAT due to FRO16K not enabled previously.  */
status_t VBAT_SwitchSRAMPowerByLDOSRAM(VBAT_Type *base)
{
    status_t status = kStatus_Success;
    status = VBAT_EnableBandgap(base, true);
    if (status == kStatus_Success)
    {
        VBAT_EnableBandgapRefreshMode(base, true);
        (void)VBAT_EnableBackupSRAMRegulator(base, true);
        base->LDORAMC |= VBAT_LDORAMC_ISO_MASK;
        base->LDORAMC |= VBAT_LDORAMC_SWI_MASK;
    }
    return status;
}