How to use one fast compare boundary flag as two CCU8 Slices trap input

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

cross mob
User13972
Level 1
Level 1
Dear all,
We would like use Phase Shift Full Bridge with two CCU8 slices and one ADC Channel. Two CCU8 slices output PWM waveforms. For safety reason, we would like implement cycle by cycle check for current value. In case the current value over some threshold, we hope we can disable the two CCU8 PWMs with the fast compare boundary flag.
We can disable one CCU8 slice when the boundary flag set right now, unfortunately, We could not find solution to disable two slices simultaneously. In Dave IDE, we can only connect the bound_fl_Channel_A Source signal with one PWM_CCU8_x, no way with two PWM_CCU8_x.



2939.attach2940.attach
0 Likes
7 Replies
Not applicable
Hi fchen2,

I am not an expert but believe you could use ERU and fulfill your requirement.

Based on XMC1300, you can connect boundary flag to one ERU input and than route it to PDOUTs (which is connected to respective CCU).
There are 2 ways you could do that:-

1) Boundary Flag -> different ERU.PDOUTs (0/1/2/3) -> respective CCUs (Event 2nd for Trap).
2) Boundary Flag -> ERU.PDOUT0 -> All CCUs (Event 2nd for Trap).

Its difficult to mention exact connection, without knowing your XMC, CCU8, ADC details.

Thanks,
--Ashish
0 Likes
Not applicable
Also I believe, if you want to achieve cycle by cycle (each PWM pulses) control, you should use comparator instead of ADC FAST/boundary compare.
0 Likes
User13972
Level 1
Level 1
Ashish,
Really appreciate your reply. We are using XMC4700.
Yes, I have tried the second method you mentioned to trap the CCU8 4 slices PWM last week.
We set all CCU80 four slices as 100KHz, 50% duty and Start automatically when power on. We set Pin 14.1 as AD input and set this channel as fast compare channel. The fast compare value we set is 2.7V.
We can trap the 4 slices by this method. And it works if that AD pin is GND when power on, we can watch all PWM waveform on oscillator, and the waveform disappear when the AD voltage above the original setting voltage value(2.7V), appear again after the AD voltage below 2.7V.
But if we set the AD pin voltage above GND level when power on, unfortunately all the 4 slices PWMs are off, no waveforms appear on oscillator, only after we set the AD value as GND, then the trap function and PWM function begin work as expected.
Do you have any idea what cause this malfunction? I am not quite sure it was the AD or the ERU caused that.
0 Likes
User13972
Level 1
Level 1
And do you know XMC4700 has comparator ? I did not found it on the reference manual
0 Likes
Not applicable
Hello fchen2,
XMC4700 doesn't have comparator, I have used XMC1300 series (which has comparators).
It seems you are already doing that way, and i dont know the resolution of your issue. Sorry.
0 Likes
Not applicable
Just as comment - If not, You could try diverting PDOUT on external pins for debug.
0 Likes
User13972
Level 1
Level 1
AshishKumarGupta wrote:
Just as comment - If not, You could try diverting PDOUT on external pins for debug.


Really, never tried it before.
Thx, let me try it, will feedback it later
0 Likes