/* param base SPC peripheral base address. param config The pointer to spc_sram_voltage_config_t, specifies the configuration of sram voltage.  */
void SPC_SetSRAMOperateVoltage(SPC_Type *base, const spc_sram_voltage_config_t *config)
/* param base SPC peripheral base address. param config The pointer to spc_sram_voltage_config_t, specifies the configuration of sram voltage.  */
void SPC_SetSRAMOperateVoltage(SPC_Type *base, const spc_sram_voltage_config_t *config)
{
    assert(config != NULL);
    uint32_t reg = 0UL;
    reg |= SPC_SRAMCTL_VSM(config->operateVoltage);
    base->SRAMCTL = reg;
    if (config->requestVoltageUpdate)
    {
        base->SRAMCTL |= SPC_SRAMCTL_REQ_MASK;
        while ((base->SRAMCTL & SPC_SRAMCTL_ACK_MASK) == 0UL)
        {
            ;
        }
        base->SRAMCTL &= ~SPC_SRAMCTL_REQ_MASK;
    }
}