STM32G431 Can't get DMA interrupts to trigger
Hi All,
I please need your help as I have been stuck longer then I care to admit,
I have a STM32G431 48-pin device which I am using TIM8 for input capture with DMA. I have an external input (PC6) for Ch1 input and am using a software trigger for Ch3.
I have a couple problems, (1) The CCR1 is getting triggered but the corresponding DMA for DMA1_Channel1 is not being triggered and (2) I am using TIM8->EGR = TIM_EGR_CC3G to trigger a capture on CCR3 but CCR3 is not getting loaded.
Is TIM8->EGR = TIM_EGR_CC3G the correct code to trigger a CCR3 capture?
Attached is my main.c edited to reduce post length. I have a MX_DMA_Init() which enables the DMA1MUX clock and DMA1 clock as well as sets the IRQ priorities. DMA_Config configures the DMA parameters for TIM8 Ch1 and Ch3.
Before entering the while() loop I enable the CCER and set the DIER register.
TIM8->DIER |= (TIM_DIER_CC3DE | TIM_DIER_CC1DE) ;
/* enable TIM8 capture / compare */
TIM8->CCER |= ( TIM_CCER_CC1E | TIM_CCER_CC3E ) ;
/* enable TIM8 */
TIM8->CR1 |= TIM_CR1_CEN;
Am I overlooking something? I do notice the DMA1 SFR looks to be set properly but I notice the DMAMUX SFR is all zeros. Is this a problem? I'm attaching a snapshot of the TIM8 SFR values. The CNT and CCR1 get updated each run/stop but all other registers remain as shown.
