Hello,
I was recently learning UCD3138 full-bridge hard switch development board firmware
I met a problem.
Is the int handle_iout_temp_comp(int iout_adc_count, int temperature) function a temperature compensation algorithm? If so, is there an application note describing the algorithm? I do not understand the meaning of the function.What are the meanings of these constants like R0_23C、ADC_COUNT_23C and FACTOR,and how do they get their values?
int handle_iout_temp_comp(int iout_adc_count, int temperature)
{
instant_resistance_negative = R0_23C - (temperature - ADC_COUNT_23C) * FACTOR; //multipled by 100000
adc_count_factor_negative = (instant_resistance_negative << 10) / R0_23C;
instant_resistance_positive = R0_23C + (temperature - ADC_COUNT_23C) * FACTOR; //multipled by 100000
adc_count_factor_positive = (instant_resistance_positive << 10) / R0_23C;
// instant_resistance = 2720 + (temperature - 1041) * 1.22; //multipled by 100000
return ((iout_adc_count * adc_count_factor_negative) >>10);
// We can switch to a multi segment linearization later on
}