I am using the SDFM1 module to measure 3-phase currents. I have the data outputs working as expected and am successfully using the data elsewhere in the microcontroller. However, I now need to use the comparator trip thresholds to detect over-current conditions and then shut-down the EPWM modules. I have successfully routed the SDFM comp trip to the EPWM modules, but am confused about how the SDFM comp values correspond to input signals.
The reference manual states that the data unit translates "low" input signals to -1 and "high" input signals to +1. But the comp unit only translates into the range 0 and +1.
How is duty cycle translated into comp values? Which of the following two alternatives is correct? The first biases the input signal with half of the comp range, whereas the second takes the absolute value of the input signal. The reference manual is not clear.
Duty Cycle = 0.0 -> Data Value = -512, Comp Value = 0
Duty Cycle = 0.5 -> Data Value = 0, Comp Value = +256
Duty Cycle = 1.0 -> Data Value = +512, Comp Value = +512
OR
Duty Cycle = 0.0 -> Data Value = -512, Comp Value = +512
Duty Cycle = 0.5 -> Data Value = 0, Comp Value = 0
Duty Cycle = 1.0 -> Data Value = +512, Comp Value = +512
Thanks in advance,
Andrew
