sys_ctrl->powerdown_run_cfg |= LPC_POWER_DOWN_BOD;
lpc_private.brown_out_detection_enabled = 0;
} else {
+ /* Power on Brown-Out Detection.
+ * (Needed for ADC, See Section 19.2 of UM10441 revision 2.1 or newer for more information) */
+ sys_ctrl->powerdown_run_cfg &= ~(LPC_POWER_DOWN_BOD);
lpc_private.brown_out_detection_enabled = 1;
/* Configure Brown-Out Detection */
/* FIXME */
/* Disable ADC Interrupt */
NVIC_DisableIRQ(ADC_IRQ);
+
+ /* Brown-Out detection must be powered to operate the ADC.
+ * See Section 19.2 of UM10441 revision 2.1 or newer for more information */
+ sys_ctrl->powerdown_run_cfg &= ~LPC_POWER_DOWN_BOD;
+
/* Power-up ADC */
sys_ctrl->powerdown_run_cfg &= ~LPC_POWER_DOWN_ADC;
/* Provide clock to ADC */
/* Power on or off a subsystem */
void subsystem_power(uint32_t power_bit, uint32_t on_off);
-/* Configure the brown-out detection */
+/* Configure the brown-out detection.
+ * Note: Brown-Out detection must be powered to operate the ADC (See Section 19.2
+ * of UM10441 revision 2.1 or newer for more information)
+ */
void system_brown_out_detection_config(uint32_t level);
/***************************************************************************** */