ePWM6 Module Initialization and Control in C
The EPWM6_Init function initializes the ePWM6 module with the given period (tbprd). It enables the ePWM6 module clock and disables the time base module clock. It initializes the time base module registers, such as TBCTL, TBPHS, TBCTR, and TBPRD, to configure the time base period and count mode. It also initializes the compare module registers, such as CMPCTL, CMPA, and CMPB, to configure the compare values and shadow register modes. It initializes the action qualifier module registers, such as AQCTLA and AQCTLB, to configure the actions taken when certain events occur. It initializes the event trigger module registers, such as ETSEL and ETPS, to configure the event trigger conditions for interrupt generation. It initializes the dead-band module and chopping module registers, such as DBCTL, DBRED, and DBFED, to configure the dead-band output and chopping control. Finally, it enables the time base counter clock.
The EPwm6A_SetCompare and EPwm6B_SetCompare functions are used to set the compare values for the ePWM6A and ePWM6B outputs, respectively. The compare values determine the duty cycle of the PWM signal.
原文地址: https://www.cveoy.top/t/topic/o8ps 著作权归作者所有。请勿转载和采集!