This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
Dear Ti community
I'm developing PCMC on HVPSFB.
To understand FET switching timing,I made time chart.
I insert DCAEV1 the middle of EPWM1 up count and down count.
(SR_mode = 2)
But,the time chart was as follows.
Q2,Q3,Q5,Q6 are strange.
So,I want you to point a mistake out.
First,COMP_A = 310,COMP_B = 20.
Count up EPWM2_CNT and soon,EPWM2_B is high because of COMP_B match.
After that EPWM2_B is low because of 1st DCAEV1 and soon be high because of COMP_B match.
Then,1st interrupt start and EPWM2_action change.
COMP_A/B_Shadow don't change(A:310→310 B:20→20), so COMP_A/B don't change at 3rd SYNC.
Then 2nd interrupt start and EPWM2_action change.
Before 4th SYNC , COMP_A/B_Shadow change(A:310→20 B:20→310), so COMP_A/B change at 4th SYNC.
At 4th SYNC,EPWM2_B is low because of CNT = 0.
And soon ,EPWM2_A is high because of COMP_A match .
Then 3rd interrupt start and EPWM2_action change.
At 6th SYNC,EPWM2_A is low because of CNT = 0.
And soon ,EPWM2_A is high because of COMP_A match .
After 6th SYNC,EPWM2_COMP_A/B_shadow change(A:20→310 B:310→20).
COMP_A/B change at 4th DCAEV1 and EPWM2_A is low because of 4th DCAEV1 .
And soon ,EPWM2_B is high because of COMP_B match .
Then 4th interrupt start and EPWM2_action change.
Before 8th SYNC,EPWM2_COMP_A/B_shadow change(A:310→20 B:20→310).
So COMP_A/B change at 8th SYNC and EPWM2_B is high because of CNT = 0 .
And soon ,EPWM2_A is high because of COMP_A match .
・・・
First,COMP_A = 310,COMP_B = 20.
When count start ,EPWM4_B is high because of CNT = 0.
And soon , EPWM4_B is low because of COMP_B match.
At 1st DCAEV1 , EPWM4_B is high because of CNT = 0.
And soon , EPWM4_B is low because of COMP_B match.
Then,1st interrupt start and EPWM4_action change.
And soon EPWM4_action change before 2nd SYNC.
At 2nd SYNC , EPWM4_A is high because of CNT = 0.
After 2nd SYNC, EPWM4_COMP_A/B_shadow change(A:310→20 B:20→310).
At 2nd DCAEV1 , COMP_A/B change,and soon EPWM4_B is high because of COMP_A match.
After that, EPWM4_A/B don't change.
Because the condition to be low EPWM_A/B is only when CNT = 0 between interrupt and SYNC(that means EPWM4_action②,④).
Yes,I'd like to know a reason why the time chart is incorrect.
But ,I get the cause only a little.
When,EPWM1 is up ,interrupt starts CNT=232.
And when is down, interrupt starts CNT = 74.
But,when I tyied using a 「ExperimentersKits」,
the interrupt starts CNT = 245~251 and CNT = 55~61.
In that case,while NOP waiting,SYNC occurs.
As a result, it becomes correct.
Why the interrupt start delayed?
To calculate excel , It's supposed that DCAEV1 occuers at 150 ,450,750 ・・・count.
EPWM2 is reseted at DCAEV1 and SYNC, isn't it.
And, the wrong time chart is settled.
I want to answer about interrupt timing.
Hi user5277039,
Yes, you are right about the SYNC.
Do you have any updates of this issue?
"When,EPWM1 is up ,interrupt starts CNT=232.
And when is down, interrupt starts CNT = 74."
This is the original settings in the HVPSFB code, isn't it?
Also I don't know whether you have modified the code when you said "But,when I tyied using a 「ExperimentersKits」"
Regards,
Chen
I don't modified the code.
I set the breakpoint at the code 「PUSH AR1H:AR0H」 because the code is the first line of interrupt.
As the result, the debug stop at the breakpoint .
Then I check the EPWM1 CNT .
CNT should be 232 or 74, but CNT = 245~251 and CNT = 55~61.
I want to understand the delay.
The reason is it takes approximately 15 cycles to enter the ISR in assembly based on the hardware. Thanks.
Regards,
Chen