Part Number: TMS570LS1224
Tool/software: Code Composer Studio
Hi
I generated pwm code by HAL but I couldnot understand the meaning of these two lines
hetRAM->Instruction[(pwm << 1U) + 41U].Control = ((hetRAM->Instruction[(pwm << 1U) + 41U].Control) & (~(uint32)(0x00000018U))) | (action << 3U);
hetRAM->Instruction[(pwm << 1U) + 41U].Data = (((pwmPeriod * pwmDuty) / 100U) << 7U) + 128U;
Please explain what is happening and how are the shift operators used.
Why does pwmduty has to be left shifted by 7 and then why 128 is added
Also in control setting, why is action shifted left 3 bits and why 18 is OR with action