/* param base VREF peripheral address. param trimValue Value of the trim register to set the output reference voltage (maximum 0x3F (6-bit)).  */
void VREF_SetVrefTrimVal(VREF_Type *base, uint8_t trimValue)
/* param base VREF peripheral address. param trimValue Value of the trim register to set the output reference voltage (maximum 0x3F (6-bit)).  */
void VREF_SetVrefTrimVal(VREF_Type *base, uint8_t trimValue)
{
    uint32_t tmp32 = base->UTRIM;
    tmp32 &= (~VREF_UTRIM_VREFTRIM_MASK);
    tmp32 |= VREF_UTRIM_VREFTRIM(trimValue);
    base->UTRIM = tmp32;
    if (VREF_CSR_CHOPEN_MASK == (base->CSR & VREF_CSR_CHOPEN_MASK))
    {
        SDK_DelayAtLeastUs(400U, SDK_DEVICE_MAXIMUM_CPU_CLOCK_FREQUENCY);
    }
    else
    {
        while ((base->CSR & VREF_CSR_VREFST_MASK) == 0U)
        {
        }
    }
}