Pārlūkot izejas kodu

Fix for latest versions of firmware

anfractuosity 2 gadi atpakaļ
vecāks
revīzija
198704009a
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      scenes/scope_scene_run.c

+ 4 - 0
scenes/scope_scene_run.c

@@ -388,6 +388,8 @@ void scope_scene_run_on_enter(void* context) {
     ramVector[44] = (uint32_t)TIM2_IRQHandler;
     __enable_irq();
 
+    furi_hal_bus_enable(FuriHalBusTIM2);
+
     // Found this recommended by https://www.freertos.org/RTOS-Cortex-M3-M4.html
     // although we're using after RTOS started
     HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
@@ -470,6 +472,8 @@ void scope_scene_run_on_enter(void* context) {
         view_port_update(view_port);
     }
 
+    furi_hal_bus_disable(FuriHalBusTIM2);
+
     // Stop DMA and switch back to original vector table
     HAL_ADC_Stop_DMA (&hadc1);
     __disable_irq();