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

Fix for latest versions of firmware

anfractuosity 2 лет назад
Родитель
Сommit
198704009a
1 измененных файлов с 4 добавлено и 0 удалено
  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;
     ramVector[44] = (uint32_t)TIM2_IRQHandler;
     __enable_irq();
     __enable_irq();
 
 
+    furi_hal_bus_enable(FuriHalBusTIM2);
+
     // Found this recommended by https://www.freertos.org/RTOS-Cortex-M3-M4.html
     // Found this recommended by https://www.freertos.org/RTOS-Cortex-M3-M4.html
     // although we're using after RTOS started
     // although we're using after RTOS started
     HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
     HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
@@ -470,6 +472,8 @@ void scope_scene_run_on_enter(void* context) {
         view_port_update(view_port);
         view_port_update(view_port);
     }
     }
 
 
+    furi_hal_bus_disable(FuriHalBusTIM2);
+
     // Stop DMA and switch back to original vector table
     // Stop DMA and switch back to original vector table
     HAL_ADC_Stop_DMA (&hadc1);
     HAL_ADC_Stop_DMA (&hadc1);
     __disable_irq();
     __disable_irq();