XMC1000 Tip of the day: Counting an external event using CCU4

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

cross mob
lock attach
Attachments are accessible only for community members.
chismo
Employee
Employee
First like received
A CCU4 timer slice can be used to count external events, for example rising edges on a GPIO pin.

The following XMC1300 example project developed using XMC Lib demonstrates this feature.


In this example project:
- Rising edges on P0.0 input is configured as the counting event for CCU40_CC40 Timer Slice.
- When the count (timer) value hits 5, a compare match while counting up is triggered where P0.1 output is toggled.
0 Likes
2 Replies
User12775
Level 5
Level 5
First solution authored First like received
Good, I will test this.
0 Likes
lock attach
Attachments are accessible only for community members.
User12775
Level 5
Level 5
First solution authored First like received
I have modified it to a complete project and verified it on XMC1100 boot kit.

Upload it here for others' reference.


Connection:
P0.0 -> P0.7
2820.attach
0 Likes