diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index b77f3dee9b..828ed2ef3e 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -330,9 +330,10 @@ void set_cpu_frequency(long frequency) { /* Increasing frequency so boost voltage before change */ ascodec_write(AS3514_CVDD_DCDC3, (AS314_CP_DCDC3_SETTING | CVDD_1_20)); - /* Confirm voltage is at least 1.20v before making fclk > 200 MHz */ - ascodec_write(AS3514_ADC_0, 4<<4); /* ADC Source = CVDD */ - while (ascodec_read(AS3514_ADC_1) < 0xe0); /* 0x1e0 *.0025 = 1.20 */ + /* Wait for voltage to be at least 1.20v before making fclk > 200 MHz */ + do + ascodec_write(AS3514_ADC_0, 4<<4); /* ADC Input = CVDD */ + while (ascodec_read(AS3514_ADC_1) < 0xe0); /* 0x1e0 *.0025 = 1.20v */ /* e0 = 8LSB's of 0x1e0 */ asm volatile( "mrc p15, 0, r0, c1, c0 \n"