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.

UCD3138: UCD3138HSFBEVM code

Part Number: UCD3138

Hello,

I have the following questions about UCD3138HSFBEVM code and appreciate urgent help:

1- In " handle_vout_prebias_state" function" , how is the scaler voltage is calculated for input (30) and output(6)? What is 0.101 and 9.901? 

2-  In " handle_vout_prebias_state" function" , how is the scaler from ADC to DAC (6.15) is calculated? 

3- In " handle_idle_state" function" , how the DAC_VALUE for the current and voltage is calculated ? I mean why 11800 stands for 12A and 7000 stands for 40V?

4- In " configure_ovp " function in configuration_functions.c, what does 5.12 stand for? How is this number calculated? 

5- In " configure_iout_ocp " function in configuration_functions.c, how is 2.414 calculated? 

I really appreciate detailed responses to these questions and not just referring to the user guide.

Thanks,

  • An expert will help you soon.
  • 1- In " handle_vout_prebias_state" function" , how is the scaler voltage is calculated for input (30) and output(6)? What is 0.101 and 9.901?
    Comments: 9.901 is the scaler of ADC sensing of Vout. 0.101 is inverse of 9.901. by using 2.5*9.901/4096, then left shifting 10 bit, you can get 6.25. here 6 is used after the minor adjustment. A similar method is used to calculate the number 30 by considering the main transformer turns ratio, the voltage scaler, and EADC resolution. After the transformation, Vout and Vin is in the same scaling.

    2- In " handle_vout_prebias_state" function" , how is the scaler from ADC to DAC (6.15) is calculated?
    Comments: the scaler 6.26 is calculated from (2.5*1000)/(4096 *0.975). A minor tuning is applied to 6.15.

    3- In " handle_idle_state" function" , how the DAC_VALUE for the current and voltage is calculated ? I mean why 11800 stands for 12A and 7000 stands for 40V?
    Comments: The comment 12A here is not updated from previous design. actually, the FE1's DAC_VALUE has been updated by the code: dac_temp = (iout_max * adc_count_factor_positive) >> 10 and FeCtrl1Regs.EADCDAC.bit.DAC_VALUE = dac_temp;

    When Vin =40V, and Fe2's DAC is 7000, EADC of FE2 is zero. It is correlated.

    4- In " configure_ovp " function in configuration_functions.c, what does 5.12 stand for? How is this number calculated?
    Comments: 5.12 is coefficient to translate the pmbus_dcdc_config[0].vout_ov_fault_limit to applicable value used for ACOMP_B_THRESH. It includes the factors such as Vout ADC sensing scaler, ACOMP's DAC LSB (19mV). The OVP threshold is (5.12 * pmbus_dcdc_config[0].vout_ov_fault_limit >>9).

    5- In " configure_iout_ocp " function in configuration_functions.c, how is 2.414 calculated?
    Comments: A similar method is used for OCP.