cancel
Showing results for 
Search instead for 
Did you mean: 

Using TIM1 CH1 External Clock on PE9 to Trigger DMA on GPIOE→IDR (Callbacks Never Fire)

johnotraffic
Visitor

Hello everyone,

I’m working with an STM32H743VIHX and CubeMX 6.13.0-RC5, and I’m trying to capture a square-wave clock on PE9 (mapped to TIM1_CH1) so that each rising edge:

  1. Increments the TIM1 counter (External Clock Mode 1 via TI1FP1)

  2. Fires a DMA transfer from GPIOE->IDR into a circular buffer

  3. Invokes my HAL_DMA_RxHalfCpltCallback() / HAL_DMA_RxCpltCallback()

Even though I can see the TIM1 counter increment (and even wrap around), my DMA callbacks never get called.

Here’s what I’ve set up:

  • PE9 → AF1 → TIM1_CH1

  • Slave Mode

    • Slave Mode = External Clock Mode 1

    • Trigger = TI1FP1

    • Polarity = Rising

  • Channel 1

    • ICSelection = Direct TI1

    • ICPolarity = Rising

    • Filter = 0

  • DMA1_Stream1 is used for TIM1_CH1

  • NVIC: DMA1_Stream1_IRQn enabled

Has anyone successfully used TIM1_CH1 → DMA1_Stream1 on an STM32H7?

I’ll attach my full main.cand stm32h7xx_hal_msp.c, files below. Any help would be greatly appreciated!

Thank you in advance for your insights.

1 REPLY 1
TDK
Super User

Ensure buffer is somewhere that DMA can access.

When code fails to behave as expected, debug it and examine the state handles for evidence of errors. Implement error callbacks.

If you feel a post has answered your question, please click "Accept as Solution".