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 TI expert
in the hw_epwm.h
//************************************************************************************************* // // The following are defines for the bit fields in the DBCTL register // //************************************************************************************************* #define EPWM_DBCTL_OUT_MODE_S 0U #define EPWM_DBCTL_OUT_MODE_M 0x3U // Dead Band Output Mode Control #define EPWM_DBCTL_POLSEL_S 2U #define EPWM_DBCTL_POLSEL_M 0xCU // Polarity Select Control #define EPWM_DBCTL_IN_MODE_S 4U #define EPWM_DBCTL_IN_MODE_M 0x30U // Dead Band Input Select Mode Control #define EPWM_DBCTL_LOADREDMODE_S 6U #define EPWM_DBCTL_LOADREDMODE_M 0xC0U // Active DBRED Load Mode #define EPWM_DBCTL_LOADFEDMODE_S 8U #define EPWM_DBCTL_LOADFEDMODE_M 0x300U // Active DBFED Load Mode #define EPWM_DBCTL_SHDWDBREDMODE 0x400U // DBRED Block Operating Mode #define EPWM_DBCTL_SHDWDBFEDMODE 0x800U // DBFED Block Operating Mode #define EPWM_DBCTL_OUTSWAP_S 12U #define EPWM_DBCTL_OUTSWAP_M 0x3000U // Dead Band Output Swap Control #define EPWM_DBCTL_DEDB_MODE 0x4000U // Dead Band Dual-Edge B Mode Control #define EPWM_DBCTL_HALFCYCLE 0x8000U // Half Cycle Clocking Enable
EPWM_DBCTL_OUT_MODE_S is the offset of the OUT_MODE
But what is the usage of EPWM_DBCTL_OUT_MODE_M?
I searched in the project, but there is no usage of EPWM_DBCTL_OUT_MODE_M
Hi WZ,
EPWM_DBCTL_OUT_MODE_M is used for the mask however there is no usage in the epwm.h.
I can confirm with software as why that is and update this thread once I receive a response.
Best,
Ryan Ma
Hi WZ,
I confirmed with software that before the EPWM_DBCTL_OUT_MODE_M was there, the mask was calculated and instead we could use this macro instead. I have filed a ticket to get this function updated to use the EPWM_DBCTL_OUT_MODE_M macro.
Thank you for bringing this to our attention.
Best,
Ryan Ma
There is currently no usage of this macro within our epwm.h. This macro is used as a mask for the driverlib function within epwm.h.
Values that end in _M represent the mask for bit field whereas values that end in _S represent the number of bits to shift a value in order to write to the bitfield.
Best,
Ryan Ma