Hi,
Could you give me a clue about finding detailed information on ePWM[1:7] blocks, integrated in TMP570LC4357?
I'd like to generate symmetric pwm signals for driving 3 phase H-bridge.
Best Regards: Szilárd
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.
Hello Szilard,
The userguide for the ePWM can be found in the LC4357 TRM chapter 35. You can also use the HalcoGen to configure the ePWM module which will save you a lot of time. HalcoGen also provides some epwm examples (example_epwm_adc.c and example_dtpwm_ecap.c) . Go to HalcoGen->Help->Help Topics->Examples you will find many examples to start with. Click on the example, it will show you step by step on how to configure ePWM module.
Dear Sunil,
I had to use ePWM[1, 3, 4] for generating Ua, Ub and Uc, because of pin M1 (GIOA[7]/N2HET2[6]/ePWM2A) is used by S1 push button on HDK board. As I expect, get the sync pulse trought ePWM[2] block would work without actually using it.
I could generate symmetric pwm pulse with the following code (HALCoGen is used for configuring times, delays etc..):
void main(void)
{
/* USER CODE BEGIN (3) */
etpwmActionQualConfig_t xActionQualConfigA, xActionQualConfigB;
gioInit();
gioSetDirection(hetPORT1, 0xAA07C821);
xActionQualConfigA.CtrEqCmpADown_Action = ActionQual_Set;
xActionQualConfigA.CtrEqCmpAUp_Action = ActionQual_Clear;
xActionQualConfigA.CtrEqCmpBDown_Action = ActionQual_Disabled;
xActionQualConfigA.CtrEqCmpBUp_Action = ActionQual_Disabled;
xActionQualConfigA.CtrEqPeriod_Action = ActionQual_Disabled;
xActionQualConfigA.CtrEqZero_Action = ActionQual_Disabled;
xActionQualConfigB.CtrEqCmpADown_Action = ActionQual_Clear;
xActionQualConfigB.CtrEqCmpAUp_Action = ActionQual_Set;
xActionQualConfigB.CtrEqCmpBDown_Action = ActionQual_Disabled;
xActionQualConfigB.CtrEqCmpBUp_Action = ActionQual_Disabled;
xActionQualConfigB.CtrEqPeriod_Action = ActionQual_Disabled;
xActionQualConfigB.CtrEqZero_Action = ActionQual_Disabled;
etpwmInit();
etpwmSetCounterMode(etpwmREG1, CounterMode_UpDown);
etpwmSetCounterMode(etpwmREG3, CounterMode_UpDown);
etpwmSetCounterMode(etpwmREG4, CounterMode_UpDown);
etpwmSetActionQualPwmA(etpwmREG1, xActionQualConfigA);
etpwmSetActionQualPwmA(etpwmREG3, xActionQualConfigA);
etpwmSetActionQualPwmA(etpwmREG4, xActionQualConfigA);
etpwmSetActionQualPwmB(etpwmREG1, xActionQualConfigB);
etpwmSetActionQualPwmB(etpwmREG3, xActionQualConfigB);
etpwmSetActionQualPwmB(etpwmREG4, xActionQualConfigB);
etpwmStartTBCLK();
// ...
}
Can you recommend a method to check if the sync link works?
Thank You for the detailed help very much!
Best Regards: Szilárd