I run the code provide by Control Suite
I get fault flag =1 while run the PCMC code
and I see through the code , I find out the PCMC code have problem.
Because I compare the code between the VMC code , and It work well at start up.
The code in PCMC is following
// Channel Selection for Cascaded Sequencer
ChSel[0] = 0; // A0 - O/P Voltage - Dummy
ChSel[1] = 0; //B // A0 - O/P Voltage
ChSel[2] = 2; // A2 - Transformer Primary Current
ChSel[3] = 9; // B1 - I/P Voltage
ChSel[4] = 0; //C // A0 - O/P Voltage
ChSel[5] = 0; // A0 - O/P Voltage - Dummy
ChSel[6] = 0; //A // A0 - O/P Voltage
ChSel[7] = 0; // A0 - O/P Voltage - Dummy
ChSel[8] = 0; //D // A0 - O/P Voltage
// ChSel[9] = 11; // B3 - Iout1
ChSel[9] = 12; // B4 - Iout2
TrigSel[0] = ADCTRIG_EPWM3_SOCA; // O/P Voltage sampling triggered by EPWM3 SOCA - Dummy
TrigSel[1] = ADCTRIG_EPWM3_SOCA; //B // O/P Voltage sampling triggered by EPWM3 SOCA
TrigSel[2] = ADCTRIG_EPWM3_SOCA; // Transformer Primary Current sampling triggered by EPWM3 SOCA
TrigSel[3] = ADCTRIG_EPWM3_SOCA; // I/P Voltage sampling triggered by EPWM3 SOCA
TrigSel[4] = ADCTRIG_EPWM3_SOCA; //C // O/P Voltage sampling triggered by EPWM3 SOCA
TrigSel[5] = ADCTRIG_EPWM1_SOCA; // O/P Voltage sampling triggered by EPWM1 SOCA at CTR = ZRO or PRD - Dummy
TrigSel[6] = ADCTRIG_EPWM1_SOCA; //A // O/P Voltage sampling triggered by EPWM1 SOCA at CTR = ZRO or PRD
TrigSel[7] = ADCTRIG_EPWM3_SOCB; // O/P Voltage sampling triggered by EPWM3 SOCB at CMPB3 - Dummy
TrigSel[8] = ADCTRIG_EPWM3_SOCB; //D // O/P Voltage sampling triggered by EPWM3 SOCB at CMPB3
TrigSel[9] = ADCTRIG_EPWM2_SOCA; // Iout triggered by EPWM2 SOCA
and I can't find the "ADCTRIG_EPWM3_SOCA" trigger by EPWM3 process in the HVPSFB-DPL-ISR.ASM
and this cause the "Transformer Primary Current sampling" wrong!
and I see through the VMC code it is following
// Channel Selection for Cascaded Sequencer
ChSel[0] = 0; // A0 - O/P Voltage - Dummy
ChSel[1] = 0; // A0 - O/P Voltage
ChSel[2] = 2; // A2 - Transformer Primary Current
ChSel[3] = 9; // B1 - I/P Voltage
ChSel[4] = 12; // B4 - Iout2
TrigSel[0] = 7; // O/P Voltage sampling triggered by EPWM2 SOCA - Dummy
TrigSel[1] = 7; // O/P Voltage sampling triggered by EPWM2 SOCA
TrigSel[2] = 7; // Transformer Primary Current sampling triggered by EPWM2 SOCA
TrigSel[3] = 7; // I/P Voltage sampling triggered by EPWM2 SOCA
TrigSel[4] = 7; // Iout sampling triggered by EPWM2 SOCA
and I did find the "Transformer Primary Current sampling triggered by EPWM2 SOCA" in the HVPSFB-DPL-ISR.ASM
and the VMC code work well.
How could I revise the PCMC code in ASM file to work normally like the preflash factory mode?