cancel
Showing results for 
Search instead for 
Did you mean: 

TIM CR2.CCDS functional?

jeffl.kelley9
Associate II
Posted on April 01, 2016 at 20:54

STM32 timers CR2 contains CCDS which seems to have no effect.

 

Reference manuals say that it selects DMA on update rather than compare.

  

DIER register contains DMA enables for all compares as well as update, so described function is already covered by this other register.

 

My question is:

 

Does timer CR2.CCDS actually do anything?

 

Example code that I can change it to the “wrong value�? and make something fail would be nice…
2 REPLIES 2
Posted on April 05, 2016 at 10:28

I've just spent a few pleasant moments playing with this bit, and if my findings are correct, this is a rather arcane feature... and surprisingly, it does exactly what the description says, triggers CCx DMA at update rather than CC event.

So, if you want to try it, simply set up a DMA bound to any CC channel, enable it as normally with CC, perform some true CC to see that DMA occurs at CC; then switch on the CR2.CCDS bit, and watch that now that very same DMA occurs at every update.

I did not write any code as this is one of the many similar thing which can be entirely checked in the debugger (hint: EGR is your friend 🙂 ).

JW

Walid FTITI_O
Senior II
Posted on April 05, 2016 at 17:33

Hi kelley.jeff.001,

This CCDS bit gives flexibility to Timer's application based on DMA to allow user switch the DMA request between channel event request and update event request which facilitates the monitoring of some particular use cases. You should try it for real to judge and share code with us.

-Hannibal-