cancel
Showing results for 
Search instead for 
Did you mean: 

DMA with complementary pwm STM32F0 ?

hdemi.1
Associate III

Hi

I want to use DMA with complematry pwm. I am usşng stm32f030 its working only one sample. I have to use stdperiph .

Thanks

1 REPLY 1

> uint32_t DestAddress = (uint32_t) &(TIM16->CCR1);

> DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t)&DestAddress;

By doing this, DMA stores the values not into TIM16_CCR1 but into memory where the DestAddress variable is located.

You want

DMA_InitStructure.DMA_PeripheralBaseAddr = (uint32_t) &(TIM16->CCR1);

If you are in doubts, always start by reading out and checking the registers, here TIM and DMA registers.

JW