2024-11-01 12:43 PM
I am trying to launch a dma of the input capture of the timer2 ch2 latched captured register to a memory buffer. I am using the DMA to allow me to record 75 captures so as to be able to determine the time for 75 cycles of a 500 KHz input signal. Set up is -
TIM2 - internal clock (250MHz) - ch2 input capture direct mode
IC CH2 - rising edge - direct - no division - filter 0
GPDMA1 CH0 - standard - circular disable - request TIM2_CH2 - DMA Handle hdma(TIM_DMA_ID_CC2) - Block single - Priority low - Transaction normal - Dir p to m - Source increment disable - Width word - Burst 1 - Port 0 - Destination increment enabled - Width word - Burst 1 - Data handling disable - Trigger disable - Transfer event half end
At the moment Icache is disabled but I have tested in all three options. I am using HAL_TIM_IC_Start_DMA(&htim2, TIM_CHANNEL_2, periods, SAMPLE_SIZE) called from an interrupt routine triggered by a separate timer. Periods is my memory buffer and SAMPLE_SIZE is set to 75.
When run, the memory buffer is left in its initialized state and no capture data is transferred. This scheme worked correctly when using a STM32f411 target with the classic dma controller. Any and all help is appreciated.