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.

MCU-PLUS-SDK-AM263X: API for EPWM_setActionQualifierShadowLoadMode not working?

Part Number: MCU-PLUS-SDK-AM263X

Tool/software:

Does the API EPWM_setActionQualifierShadowLoadMode actually work properly?  I am using SDK version 9.01.

I have been having some trouble getting the EPWM AQCTLA register updated concurrently with the CMPA and CMPB registers.  So I dug into the API.

When I tried the code in an online compiler, the output I get is 0x0, when it should be 0x10 to indicate shadow load mode.  Please check.

uint16_t aqModule = 0;
uint16_t syncModeOffset;
uint16_t shadowModeOffset;
uint16_t my_out;
syncModeOffset = 0x0008U + aqModule;
shadowModeOffset = 0x0004U + aqModule;
my_out = (( 0x0000U & ((~((0x0003U << aqModule) | (0x0003U << syncModeOffset))) | (0x0001U << shadowModeOffset))) | (((0U >> 2U) << syncModeOffset) | ((0U & 0x0003U) << aqModule)));
printf("Result 0x%x",my_out);