cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F050 DMA1.4 transfer on Timer3 Trigger

ne562
Associate II
Posted on September 27, 2015 at 13:10

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-dma
2 REPLIES 2
Posted on September 28, 2015 at 06:56

And what do the DMA flags indicate? You are supposed to clear them before you enable the channel/stream.

JW

ne562
Associate II
Posted on September 28, 2015 at 13:23

now all works, freq.notch.t3 pointed to wrong variable.