XMC1000 TIP of the day: Software TRAP for CCU8

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

cross mob
Not applicable
TRAP function in the CCU8 allows the PWM output react on the state of an input pin.
This functionality can be used to switch off the power devices if the TRAP input becomes active and the PWM output will return to the default (passive) state.
However, it is unable to trigger TRAP function via software.
If the PWM is turn off via the timer run bit, the PWM output will remain at the last known state instead of the passive state.
So in order to implement software TRAP function, we can use the Multi channel Mode in POSIF module.
Enable the Multi channel control on CCU8 (CC8yTC.MCMEx) and configured the POSIF to Stand-Alone Multi-Channel Mode (PCONF.FSEL = 0x02).
Then by updating the Multi Channel Pattern (MCSM.MCMPS), the timer slice that connected to the multi channel mode will be trigger.
For example, CCU80.MCI01 is refer to POSIF0.MOUT[0], so when multi channel pattern turn that output to LOW, the CCU80 output will go to passive state.
0 Likes
3 Replies
User9136
Level 1
Level 1
Welcome! First reply posted
hi,

it works on XMC4500 to 🙂



best regards
Wlodek
0 Likes
User13972
Level 1
Level 1
It works. I have to say it is a little complicated to do such configuration, going through the whole datasheet really time consuming.
0 Likes
User15044
Level 1
Level 1
Something I just discovered, a heads up for anyone driving a H-bridge with CCU:
Based on the hardware manual of XMC4700/4800, the trap function appears to control the output pin control block directly, and it bypasses the deadtime generators. Thus, each time you activate the trap, the high and low side switches may both be temporarily in a conducting state, i.e. the bridge is short circuited.
0 Likes