Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CCS/TMS570LS1224: nhet instruction meaning

$
0
0

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


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>