partially solved issue with random modulator and ADC clock stopping at the end of ЛЧМ. Done: when we want to stop clocks -- enable IRQ on sloewr clock (TIM11). In IRQ switches TIM4, TIM11 to one-pulse mode, disables IRQ. When we starting these timers th next time -- we resets their counters, one-pulse mode disables.

This commit is contained in:
2025-04-15 21:29:24 +03:00
parent 0829fd0983
commit 9974606734
5 changed files with 45 additions and 2 deletions

View File

@ -378,6 +378,9 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
/* USER CODE END TIM11_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM11_CLK_ENABLE();
/* TIM11 interrupt Init */
HAL_NVIC_SetPriority(TIM1_TRG_COM_TIM11_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TIM1_TRG_COM_TIM11_IRQn);
/* USER CODE BEGIN TIM11_MspInit 1 */
/* USER CODE END TIM11_MspInit 1 */
@ -485,6 +488,9 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
/* USER CODE END TIM11_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM11_CLK_DISABLE();
/* TIM11 interrupt DeInit */
HAL_NVIC_DisableIRQ(TIM1_TRG_COM_TIM11_IRQn);
/* USER CODE BEGIN TIM11_MspDeInit 1 */
/* USER CODE END TIM11_MspDeInit 1 */