From 91d4ec44243e08c39c9bc559be5502534652f398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Wed, 11 Mar 2020 15:11:50 +0100 Subject: [PATCH] Fix COMP and ADC interrupt conflict for STM32L0 The STM32L0 uses the same interrupt for ADC and COMP, which creates interference with the Zephyr ADC driver. Proper fix needed! --- src/load_drv.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/load_drv.cpp b/src/load_drv.cpp index 5d0bc45..0b02d3f 100644 --- a/src/load_drv.cpp +++ b/src/load_drv.cpp @@ -252,7 +252,11 @@ void load_out_init() #endif // analog comparator to detect short circuits and trigger immediate load switch-off +#ifdef __MBED__ + // The STM32L0 uses the same interrupt for ADC and COMP, which creates interference with the + // Zephyr ADC driver that need still to be resolved short_circuit_comp_init(); +#endif // enable charge pump for high-side switches (if existing) load_cp_enable();