PWM Trap example

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

cross mob
Not applicable
Hi All,

I would like to have a PWM output switch on and of depending on the TRAP input into the CCU unit. I can not seem to get this to work. I would either have that my PWM just does not switch off, or does not switch on.

Setup:
XMC1300, DAVE 4

What I have tried the following with APPs:
1) Add digital input
2) Add event detecter
3) Add event generator
4) PWM with CCU4

Configuration
1) Connect DIO -> Event detector
2) Connect Event detector -> Event Generator
3) Connect Event generator -> "event 2" of CCU unit
4) CCU unit has "event 2" as "External Trap", enabled at initialization, Trap level: Active high, exit synchronization: Enable, Exit control: Auto exit
5) PWM CCU4 is setup to start during initialization

Expectation:
See PWM output on predefined pin appear and go away as I trigger via the digital input.

Any help would be appreciated, even better yet, example code.

Regards
Enigma
0 Likes
1 Reply
Not applicable
Hi All,

Got it to work, made a mistake in my physical setup.

Regards
Enigma
0 Likes