Skip to main content
MSipo
Senior II
December 21, 2022
Question

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

  • December 21, 2022
  • 1 reply
  • 1098 views

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?

This topic has been closed for replies.

1 reply

LCE
Principal II
December 21, 2022

Have you initialized TIM8 correctly?

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

MSipo
MSipoAuthor
Senior II
December 21, 2022

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