Hello,
I download latest ControlSuite (3.3.1) and
I read code in "F2837xD_SysCtrl.c" V150
lines 66 ... 78
//enable pull-ups on unbonded IOs as soon as possible to reduce power consumption. GPIO_EnableUnbondedIOPullups(); CpuSysRegs.PCLKCR13.bit.ADC_A = 1; CpuSysRegs.PCLKCR13.bit.ADC_B = 1; CpuSysRegs.PCLKCR13.bit.ADC_C = 1; CpuSysRegs.PCLKCR13.bit.ADC_D = 1; //check if device is trimmed if(*((Uint16 *)0x5D1B6) == 0x0000){ //device is not trimmed, apply static calibration values AnalogSubsysRegs.ANAREFTRIMA.all = 31709; AnalogSubsysRegs.ANAREFTRIMB.all = 31709; AnalogSubsysRegs.ANAREFTRIMC.all = 31709; AnalogSubsysRegs.ANAREFTRIMD.all = 31709; } CpuSysRegs.PCLKCR13.bit.ADC_A = 0; CpuSysRegs.PCLKCR13.bit.ADC_B = 0; CpuSysRegs.PCLKCR13.bit.ADC_C = 0; CpuSysRegs.PCLKCR13.bit.ADC_D = 0; EDIS; // Initialize the PLL control: PLLCR and CLKINDIV // F28_PLLCR and F28_CLKINDIV are defined in F2837xD_Examples.h // Note: The internal oscillator CANNOT be used as the PLL source if the // PLLSYSCLK is configured to frequencies above 194 MHz. InitSysPll(XTAL_OSC,IMULT_20,FMULT_1,PLLCLK_BY_2); //PLLSYSCLK = 20MHz(XTAL_OSC) * 20 (IMULT) * 1 (FMULT) / 2 (PLLCLK_BY_2) //Turn on all peripherals InitPeripheralClocks();
the code "check if device is NOT trimmed"
and fill ANAREFTRIMx regs with 31709 static value,
but the question is:
if the device is trimmed what value I have to fill in ANAREFTRIMx regs ??