2015-09-27 04:10 AM
I'm trying to enable DMA1.4 transfer from TIM3->CNT to memory on Timer3 trigger event. Timer3 is configured as slave of Timer2.
Timers2/3 counts ok, but DMA don't transfer on trigger. DMA configuration code: RCC->AHBENR |= RCC_AHBPeriph_DMA1; DMA1_Channel4->CNDTR = 1; DMA1_Channel4->CPAR = (u32)&TIM3->CNT; DMA1_Channel4->CMAR = freq.notch.t3; DMA1_Channel4->CCR = DMA_Priority_High | DMA_MemoryDataSize_HalfWord | DMA_PeripheralDataSize_HalfWord | DMA_CCR_EN; TIM3->DIER = TIM_DIER_TDE; TIM2->DIER = TIM_DIER_CC4DE; #stm32-dma2015-09-27 09:56 PM
And what do the DMA flags indicate? You are supposed to clear them before you enable the channel/stream.
JW2015-09-28 04:23 AM
now all works, freq.notch.t3 pointed to wrong variable.