Hello everybody,
I'm useing the Matlab Simulink Embedded Code support Package for C2000 with Matlab 2020b. The comperator of the SDFM Module is used to detect an over current situation and i want to use this to force an ePWM to low with the Trip Zone. I used Custom Code with the System Initialize block to configure the ePWm x-bar.
the Digital compare unit of the ePWM was configured like this:
and the Trip Zone like this :
Now i turned the current slowly up so that the Higher threshold of the SDFM comperator was triggerd. The ePWM signal was displayed by a Scope but it was not forced to low.
I also observed the ePWM TZFLG register in Code Composer Studio. The DCAEVT1 Bit was set when the over current happend. Maybe someone can help me with this Problem.
Thanks a lot.
Phillip