Other Parts Discussed in Thread: TMS320F2837
Hi
I am using TMS320F28379D controller for motor drive PWM geneartion. However sometimes middle of the motor run, I got constant GPIO output of 3.3 V when i operate 90% duty ratio and 0 V when it below 20 % duty ratio. I am curiosity to know at what condition this will happen and under TMS freeze condition, What value will TMS320 send ?
epwm configuration settings:
EALLOW;
// Disable pull-up on and gonfigure as EPWM
ATI_HUBMOTOR_PULL_UP = 1;
ATI_HUBMOTOR_MUX = 1;
EDIS;
hubmotor->TBCTL.bit.CTRMODE = TB_COUNT_UP; // Count up
hubmotor->TBPRD = REARMOTOR_TIMER_TBPRD; // Set timer period
hubmotor->TBCTL.bit.PHSEN = TB_DISABLE; // Disable phase loading
hubmotor->TBPHS.bit.TBPHS = 0x0000; // Phase is 0
hubmotor->TBCTR = 0x0000; // Clear counter
hubmotor->TBCTL.bit.HSPCLKDIV = TB_DIV2; // Clock ratio to SYSCLKOUT
hubmotor->TBCTL.bit.CLKDIV = TB_DIV1;
//
// Setup shadow register load on ZERO
//
hubmotor->CMPCTL.bit.SHDWAMODE = CC_SHADOW;
hubmotor->CMPCTL.bit.SHDWBMODE = CC_SHADOW;
hubmotor->CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
hubmotor->CMPCTL.bit.LOADBMODE = CC_CTR_ZERO;
//
// Set Compare values
//
hubmotor->CMPA.bit.CMPA = 0; // Set default A value
hubmotor->CMPB.bit.CMPB = 0; // Set default A value
//
// Set actions
//
hubmotor->AQCTLA.bit.ZRO = AQ_SET; // Set PWM1A on Zero
hubmotor->AQCTLA.bit.CAU = AQ_CLEAR; // Clear PWM1A on event A,
// up count
hubmotor->AQCTLB.bit.ZRO = AQ_SET; // Set PWM1B on Zero
hubmotor->AQCTLB.bit.CBU = AQ_CLEAR; // Clear PWM1B on event B,
// up count
}
From the figure it was observed that from 12 sec to 17 sec we missed the communication from delfino (TMS320F2837) (UART to USB ) and observed vehicle stop. However it restarted communication and went until 30 sec, after 30 sec again we observed delfino communication and observed vehicles moving more fast (This will happen only when motor driver receives constant 3.3 V) .
In the first incident our PWM value was very low and might be due to that the GPIO pin settled at zero and second incident GPIO might be settled at high since our pwm value was max at that condition.
We want to know at what condition this will happen and at what condition the TMS320 will automatically reset.
In any case TMS320 will hang (frozen) ?
We have been working on the same hardware and firmware from more than 5 years and observed two times in the span of 3 months this incident even after replacing TMS320 board also.
Please let me know the cause of incident.