Hi,
I am evaluating UCD3138ALLCEVM for digital LLC application and reviewing the code
UCD3138AFW-LLCWSRDTO — UCD3138A LLC Half bridge Firmware
Under the C file, init_front_end.c I have a question on following lines of code:
void init_front_end0(void)
{
//Initialize DAC to 0.
FeCtrl0Regs.EADCDAC.bit.DAC_VALUE = 0;
// Initialize Front End Gain
FeCtrl0Regs.EADCCTRL.bit.AFE_GAIN = 3;
// Use 16 MHz sampling frequency
FeCtrl0Regs.EADCCTRL.bit.SCFE_CLK_DIV_2 = 0;
//0 - standard, 1 - averaging mode
FeCtrl0Regs.EADCCTRL.bit.EADC_MODE = 0;
//Averaging config 0 - 2x, 1 - 4x, 2 - 8x
FeCtrl0Regs.EADCCTRL.bit.AVG_MODE_SEL = 2;
//Sample triggers are configured by the DPWM
FeCtrl0Regs.EADCCTRL.bit.AVG_SPATIAL_EN = 1;
// Configure soft start ramp
FeCtrl0Regs.RAMPCYCLE.bit.DELAY_CYCLES = 0;
FeCtrl0Regs.RAMPCYCLE.bit.SWITCH_CYC_PER_STEP = 0;
FeCtrl0Regs.RAMPCTRL.bit.RAMP_SAT_EN = 0;
FeCtrl0Regs.RAMPCTRL.bit.RAMP_EN = 1;
}
It says make use of 16Mhz, instead 8Mhz is used.
Standard Mode is turned on but the following code is asking for spatial averaging with 8x averaging.
So, in order to make use of spatial averaging, the front end should be operated in standard mode or averaging mode?
Regards,
Nitish