Просмотр исходного кода

Disable ADC and timer

Noticed if ADC interrupt wasn't properly disabled
there appeared issues with other applications.
anfractuosity 2 лет назад
Родитель
Сommit
62637e6efc
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      scenes/scope_scene_run.c

+ 4 - 0
scenes/scope_scene_run.c

@@ -544,6 +544,10 @@ void scope_scene_run_on_enter(void* context) {
 
     furi_hal_bus_disable(FuriHalBusTIM2);
 
+    // Disable ADC interrupt and timer
+    LL_ADC_DisableIT_OVR(ADC1);
+    LL_TIM_DisableCounter(TIM2);
+
     // Stop DMA and switch back to original vector table
     LL_DMA_DisableChannel(DMA1, LL_DMA_CHANNEL_1);