Counting direction of CCU4/CCU8 timers

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I can't seem to find a way in sw to set the counting direction of the timers to down. You can select that the direction is selected by an input but is there no way of selecting the direction without using an input? I know that the current direction is shown in the CC4yTCST register but in the CC4yTCSET register the direction bit is not present and only the run bit can be set.

Thanks, Jesper
0 Likes
2 Replies
Mike1
Employee
Employee
5 sign-ins First question asked 10 replies posted
Hi Jesper,

You have to use an "external" signal to change the count direction. When I want to do this, I use either a I/O pin (which I can set high or low) or an unused signal (there should be plenty of them).

Mike
0 Likes
Not applicable
Ok. I understand that I can use the signals connected to ccu4x.ind to ccu4x.inp but I wouldn't say that I think it is a pleasant solution to have to select a signal from another module since the slice is all of a sudden dependent on another module. It makes the puzzle of allocating MCU resources in a project with many developers even more complicated.

But thank you for the quick answer!

Jesper