diff --git a/firmware/rolo.c b/firmware/rolo.c index e60af46704..7cded0906f 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c @@ -286,7 +286,9 @@ int rolo_load(const char* filename) lcd_remote_puts(0, 1, "Executing"); lcd_remote_update(); #endif +#if (CONFIG_KEYPAD != XDUOO_X3_PAD) /* X3 adc hangs on ROLO */ adc_close(); +#endif #if CONFIG_CPU == AS3525v2 /* Set CVDD1 power supply to default*/ ascodec_write_pmu(0x17, 1, 0); diff --git a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c index 0d251754dd..0db1bada9b 100644 --- a/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c +++ b/firmware/target/mips/ingenic_jz47xx/xduoo_x3/sadc-xduoo_x3.c @@ -260,6 +260,12 @@ int _battery_voltage(void) void adc_init(void) { bat_val = ADC_MASK; + /* don't re-init*/ + if (!(REG_CPM_CLKGR0 & CLKGR0_SADC) && !(REG_SADC_ADENA & ADENA_POWER)) + { + system_enable_irq(IRQ_SADC); + return; + } __cpm_start_sadc(); mdelay(20);