Skip to main content
ne562
Associate III
Sep 27, 2015 11:10 AM UTC
Question

STM32F050 DMA1.4 transfer on Timer3 Trigger

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
This topic has been closed for replies.

2 replies

waclawek.jan
Super User
Sep 28, 2015 4:56 AM UTC
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
ne562Author
Associate III
Sep 28, 2015 11:23 AM UTC
Posted on September 28, 2015 at 13:23

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