/* param base FLEXSPI peripheral base address. param clockSource clockSource of type #flexspi_read_sample_clock_t  */
void FLEXSPI_UpdateRxSampleClock(FLEXSPI_Type *base, flexspi_read_sample_clock_t clockSource)
/* param base FLEXSPI peripheral base address. param clockSource clockSource of type #flexspi_read_sample_clock_t  */
void FLEXSPI_UpdateRxSampleClock(FLEXSPI_Type *base, flexspi_read_sample_clock_t clockSource)
{
    uint32_t mcr0Val;
    while (!FLEXSPI_GetBusIdleStatus(base))
    {
    }
    mcr0Val = base->MCR0;
    mcr0Val &= ~FLEXSPI_MCR0_RXCLKSRC_MASK;
    mcr0Val |= FLEXSPI_MCR0_RXCLKSRC(clockSource);
    base->MCR0 = mcr0Val;
    FLEXSPI_SoftwareReset(base);
}