cancel
Showing results for 
Search instead for 
Did you mean: 

Timer triggered DMA doesn't work

WojtekP1
Associate III

I want to sample GPIO state twice per millisecond with DMA.

I used TIM16 as basic counter - setting TIM16 CR1 register to 1, ARR to 32000 (half milisecond) and TIM16 DIER register to enable DMA on update (bit 8).

Timer is checked to work fine. DMA doesn't work. No matter how i set up DMA (circular or not) for peripheral to memory transfer with GPIO_IDR as source - it doesn't work.

Actually - i found that it gets automatically turned off - CCR registers enable bit gets cleared.

What's wrong?

5 REPLIES 5
WojtekP1
Associate III

G030

WojtekP1
Associate III

G030 has only DMA1 and 5 channels. Does it means it cannot do DMA from GPIO at all?

Not really a problem in my use - it's slow enough (20000 times per second) that i can use interrupt, but may be disabling nonfeature in some use cases.

In 'G0, GPIOs are not connected to the bus matrix. See second link above.

JW

WojtekP1
Associate III

Fortunately GPIO DMA wasn't required for that project. But good to know in future. GPIO/DMA is excellent feature, sad it's missing there.