In system_defines.h
Scale of Vo is DAC_VALUE_SCALER (912)
How can I change the following scale of ADC?
AD13: Io*1mohm*35.7kohm/1kohm
AD06: 400VIN = 1.93V
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.
In system_defines.h
Scale of Vo is DAC_VALUE_SCALER (912)
How can I change the following scale of ADC?
AD13: Io*1mohm*35.7kohm/1kohm
AD06: 400VIN = 1.93V
Hello,
These scale are defined in line 230 and 234 in system_define.h:
#define ADC12_IOUT_SCALER_MANTISSA (29947)
#define ADC12_VIN_SCALER_MANTISSA (32380)
Here is how these value comes from:
Iout scale = 1mohm*35.7kohm/1kohm = 0.001*35.7/1
29947 = ((Iout scale/2.5) << 12) << 9
Vin scale = 1.93/400
32380 = ((Vin scale/2.5) << 12) << 12
To change the scale, change the value defined in line 230 and 234.
29947 = ((Iout scale/2.5) << 12) << 9
1. What is "12"?
In pmbus_topology.h line 188 #define IOUT_OC_FAULT_LIMIT (40)
2. Why OCP is not change while I modify the Iout scale?
left shifted by 12 is because the ADC is 12-bit
OCP is implemented by UCD internal analog comparator, not by ADC measurement. To change the OCP threshold, change the values defined in line 188
The OCP is disable.
In configuation_functions.c line 171
if (pmbus_dcdc_config[0].iout_oc_fault_response & IOUT_OC_FAULT_RESPONSE_BITS_MASK)
iout_oc_fault_response and IOUT_OC_FAULT_RESPONSE_BITS_MASK are different.
iout_oc_fault_response = 0
IOUT_OC_FAULT_RESPONSE_BITS_MASK = 0xC0
You are right, the OCP is disabled. You can set the iout_oc_fault_response = 1 to enable it.