cancel
Showing results for 
Search instead for 
Did you mean: 

Does a call to HAL_ADC_Start_DMA() temporarily pause other timer interrupts?

MSipo
Senior II

I'm using an STM32F429. I'm doing a motor control application.

I enable a lot of timers at startup in my application.

But during runtime when the application receives a command it enables a timer capture through DMA on TIM8. This is when there is a small pause when it calls HAL_TIM_IC_Start_DMA(). This disturbs other interrupts that seem to pause temporarilly.

These are my timers I enable at startup:

  // Start timers
  HAL_TIM_Base_Start(&htim1);
  HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_1);
  HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_2);
  HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
  HAL_TIM_IC_Start_DMA(&htim5, TIM_CHANNEL_4, countCapture, ARRAY_SIZE(countCapture));
  HAL_TIM_IC_Start_IT(&htim5, TIM_CHANNEL_1);
  HAL_TIM_Base_Start_IT(&htim6);

My call to HAL_TIM_IC_Start_DMA() during runtime. This is when other interrupts are disturbed.

HAL_TIM_IC_Start_DMA(&htim8, TIM_CHANNEL_1, (uint32_t *)countCaptureWholeTurn, ARRAY_SIZE(countCaptureWholeTurn));

Why does it pause other interrupts during this call?

2 REPLIES 2
LCE
Principal

Have you initialized TIM8 correctly?

Maybe it immediately jumps into a TIM8 ISR with higher priority and thus blocks other interrupts.

I have confirmed that the TIM8 interrupt only happens once after it has captured all values by DMA to my array.