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.

CCS/UCD3138PFCEVM-026: PWR026_PFC: In the following codes .What 4096 and 32768 mean?

Part Number: UCD3138PFCEVM-026


Tool/software: Code Composer Studio

 What are they used to do?

Could the two values be update if  I update the VAC_FULL_RANGE or VBUS_FULL_RANGE ?

  • Those are all to support integer math.  The numbers we are dealing with are fractional numbers, so we could use floating point math.  But integer math is much faster on the ARM7.  So instead of using fractions, we multiply everything by powers of 2, in this case 2**15 and 2**12.  Then after we multiply by these constants, we do a shift right by 15 or 12 to scale back down to the correct result.  It's a standard trick, especially with integer DSPs.