2016-04-01 11:54 AM
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…
2016-04-05 01:28 AM
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 :) ). JW2016-04-05 08:33 AM
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-