#define ADC_MAGIC_SLEEP_REG 0xffff //ADC Register MAP, taken from ADC32RF45_LMFS_42810.cfg (given to us by TI) struct { uint16_t usAddr; uint8_t ucVal; } grInternalAdcInitCmds[] = { //42810 ///ADC32RF42/ConfigFiles_ADC32RF42_ NYQUIST1/Powerup_Analog_Config.cfg //ADC32RFxx_LOWLEVEL { 0x0000, 0x81 }, // Global software reset. Remember the sequence of programming the config files is Powerup_Analog_Config-->IL_Config_Nyqx_chA-->IL_Config_Nyqx_chB-->NL_Config_Nyqx_chA-->NL_Config_Nyqx_chB-->JESD_Config { 0x0011, 0xFF }, // Select ADC page. { 0x0022, 0xC0 }, // Analog trims start here. { 0x0032, 0x80 }, // ... { 0x0033, 0x08 }, // ... { 0x003F, 0x00 }, { 0x0042, 0x03 }, // ... { 0x0043, 0x03 }, // ... { 0x0045, 0x58 }, // ... { 0x0046, 0xC4 }, // ... { 0x0047, 0x01 }, // ... { 0x0053, 0x01 }, // ... { 0x0054, 0x08 }, // ... { 0x0064, 0x05 }, // ... { 0x0072, 0x84 }, // ... { 0x008C, 0x80 }, // ... { 0x0097, 0x80 }, // ... { 0x00F0, 0x38 }, // ... { 0x00F1, 0xBF }, // Analog trims ended here. { 0x0011, 0xCC }, // Power down of unused cores { 0x0020, 0xD0 }, { 0x0031, 0xE0 }, { 0x0043, 0x83 }, { 0x0062, 0x80 }, { 0x0063, 0x01 }, { 0x004D, 0x01 }, { 0x0011, 0x00 }, // Disable ADC Page { 0x0011, 0x00 }, // Disable ADC Page { 0x0012, 0x04 }, // Select Master Page { 0x0058, 0x20 }, { 0x0025, 0x01 }, // Global Analog Trims start here. { 0x0026, 0x40 }, //... { 0x0027, 0x80 }, //... { 0x0029, 0x40 }, //... { 0x002A, 0x80 }, //... { 0x002C, 0x40 }, //... { 0x002D, 0x80 }, //... { 0x002F, 0x40 }, //... { 0x0034, 0x01 }, //... { 0x003F, 0x01 }, //... { 0x0039, 0x50 }, //... { 0x003B, 0x2C }, //... { 0x0040, 0x80 }, //... { 0x0042, 0x40 }, //... { 0x0043, 0x80 }, //... { 0x0045, 0x40 }, //... { 0x0046, 0x80 }, //... { 0x0048, 0x40 }, //... { 0x0049, 0x80 }, //... { 0x004B, 0x40 }, //... { 0x0053, 0x60 }, //... { 0x0059, 0x02 }, //... { 0x005B, 0x08 }, //... { 0x005c, 0x07 }, //... { 0x0057, 0x10 }, // Register control for SYSREF --these lines are added in revision SBAA226C. { 0x0057, 0x18 }, // Pulse SYSREF, pull high --these lines are added in revision SBAA226C. { 0x0057, 0x10 }, // Pulse SYSREF, pull back low --these lines are added in revision SBAA226C. { 0x0057, 0x18 }, // Pulse SYSREF, pull high --these lines are added in revision SBAA226C. { 0x0057, 0x10 }, // Pulse SYSREF, pull back low --these lines are added in revision SBAA226C. { 0x0057, 0x00 }, // Give SYSREF control back to device pin --these lines are added in revision SBAA226C. { 0x0012, 0x00 }, // Master page disabled { 0x0011, 0xFF }, // Select ADC Page { 0x0083, 0x07 }, // Additioanal Analog trims { 0x005C, 0x00 }, //... { 0x005C, 0x01 }, //... { 0x0011, 0x00 }, //Disable ADC Page. Power up Analog writes end here. Program appropriate -->IL_Config_Nyqx_chA-->IL_Config_Nyqx_chB-->NL_Config_Nyqx_chA-->NL_Config_Nyqx_chB-->JESD_Config { 0x4001, 0x00 }, //DC corrector Bandwidth settings { 0x4002, 0x00 }, //... { 0x4003, 0x00 }, //... { 0x4004, 0x61 }, //... { 0x6068, 0x42 }, //... { 0x4003, 0x01 }, //... { 0x6068, 0x42 }, //... ///ADC32RF42/ConfigFiles_ADC32RF42_ NYQUIST1/IL_Config_Nyq1_chA.cfg //ADC32RFxx_LOWLEVEL { 0x4001, 0x00}, //Select Main Digial Page. Remember the sequence of programming the config files is Powerup_Analog_Config-->Nyquist_x_config1-->Nyquist_x_Config2-->JESD_Config { 0x4002, 0x00}, //... { 0x4003, 0x00}, //... { 0x4004, 0x61}, //... { 0x6000, 0x02}, //... { 0x4001, 0x00}, //... { 0x4002, 0x00}, //... { 0x4003, 0x00}, //... { 0x4004, 0x6a}, //... { 0x6012, 0x44}, //... { 0x4001, 0x00}, //... { 0x4002, 0x00}, //... { 0x4004, 0x68}, //... { 0x4003, 0x00}, //Main digital page selected for chA { 0x6042, 0x3C}, //Program global settings for Interleaving Corrector { 0x6043, 0x26}, //... { 0x6044, 0x01}, //... { 0x6045, 0x10}, //... { 0x6049, 0x80}, //... { 0x604a, 0x02}, //... { 0x604B, 0x03}, //... { 0x6053, 0x00}, //... { 0x6056, 0x75}, //... { 0x6057, 0x75}, //... { 0x605A, 0x06}, //... { 0x605E, 0x01}, //... { 0x6062, 0x00}, //... { 0x6068, 0x04}, //... { 0x6069, 0x00}, //... { 0x6071, 0x20}, //... { 0x607D, 0x03}, //... { 0x6080, 0x0F}, //... { 0x6081, 0xCB}, //... { 0x608B, 0x20}, //... { 0x608C, 0x08}, //... { 0x608D, 0x64}, //... { 0x608F, 0x0C}, //... { 0x6096, 0x0F}, //... { 0x6097, 0x26}, //... { 0x6098, 0x00}, //... { 0x6099, 0x08}, //... { 0x609C, 0x08}, //... { 0x609D, 0x20}, //... { 0x60A2, 0x08}, //Progam nyquist zone 2 for chA, nyquist zone = 1 : 0x08, nyquist zone = 2 : 0x09, nyquist zone = 3 : 0x0A { 0x60A5, 0x7D}, //... { 0x60A9, 0x0B}, //... { 0x60AA, 0x00}, //... { 0x60AB, 0x77}, //... { 0x60AC, 0x01}, //... { 0x60AD, 0x77}, //... { 0x60AE, 0x01}, //... { 0x60BE, 0x03}, //... { 0x60FF, 0xC0}, //... { 0x6000, 0x00}, // Dig Core reset { 0x6000, 0x01}, //... { 0x6000, 0x00}, //... ///ADC32RF42/ConfigFiles_ADC32RF42_ NYQUIST1/IL_Config_Nyq1_chb.cfg //ADC32RFxx_LOWLEVEL { 0x4001, 0x00}, //Select Main Digial Page. Remember the sequence of programming the config files is Powerup_Analog_Config-->Nyquist_x_config1-->Nyquist_x_Config2-->JESD_Config { 0x4002, 0x00}, //... { 0x4003, 0x01}, //... { 0x4004, 0x61}, //... { 0x6000, 0x02}, //... { 0x4004, 0x6a}, //... { 0x6013, 0x01}, //... { 0x6014, 0x80}, //... { 0x4001, 0x00}, //Select Main Digial Page. Remember the sequence of programming the config files is Powerup_Analog_Config-->Nyquist_x_config1-->Nyquist_x_Config2-->JESD_Config { 0x4002, 0x00}, { 0x4003, 0x01}, //Main digital page selected for chB { 0x4004, 0x68}, { 0x6049, 0x80}, //Special setting for chB { 0x6042, 0x20}, //Special setting for chB { 0x60A2, 0x08}, //Progam nyquist zone 2 for chB nyquist zone = 1 : 0x08 nyquist zone = 2 : 0x09 nyquist zone = 3 : 0x0A { 0x60AA, 0x00}, //... { 0x4003, 0x00}, //Main digital page selected for chA { 0x6000, 0x00}, // Dig Core reset { 0x6000, 0x01}, //... { 0x6000, 0x00}, //... { 0x0012, 0x04}, //Unused ADC SHA and sp_clk of channel Bpowerdown { 0x0011, 0x00}, //... { 0x003E, 0xCC}, //... { 0x0033, 0xCC}, //... { 0x0052, 0x40}, //... { 0x0034, 0x01}, //... { 0x0036, 0x40}, //... { 0x0012, 0x00}, //... { ADC_MAGIC_SLEEP_REG, 100 },//Sleep for 50 msec (page 108 of adc32RF42 datasheet ///ADC32RF42/ConfigFiles_ADC32RF42_ NYQUIST1/NL_Config_Nyq1_chA_Band_0_250M.cfg //ADC32RFxx_LOWLEVEL { 0x4001, 0x00}, //chA Non Linearity Trims for Nyq1. Remember the sequence of programming the config files is Powerup_Analog_Config-->IL_Config_Nyqx_chA-->IL_Config_Nyqx_chB-->NL_Config_Nyqx_chA-->NL_Config_Nyqx_chB-->JESD_Config { 0x4002, 0xF7}, //... { 0x4003, 0x00}, //... { 0x4004, 0x20}, //... { 0x60E0, 0x2d}, //... { 0x60E1, 0x10}, //... { 0x60F7, 0x1f}, //... { 0x60F8, 0x12}, //... { 0x4002, 0xF8}, //... { 0x600E, 0x2d}, //... { 0x600F, 0x10}, //... { 0x6025, 0x1f}, //... { 0x6026, 0x12}, //... { 0x603C, 0xf9}, //... { 0x603D, 0xfe}, //... { 0x6053, 0xf8}, //... { 0x6054, 0xfe}, //... { 0x606A, 0xf9}, //... { 0x606B, 0xfe}, //... { 0x6081, 0xf8}, //... { 0x6082, 0xfe}, //... { 0x6098, 0x0 }, //... { 0x6099, 0x0 }, //... { 0x60AF, 0xff}, //... { 0x60B0, 0x0 }, //... { 0x60C6, 0x0 }, //... { 0x60C7, 0x0 }, //... { 0x60DD, 0xff}, //... { 0x60DE, 0x0 }, //... { 0x60F4, 0xFF}, //... { 0x60F5, 0x00}, //... { 0x60F6, 0x0 }, //... { 0x60F7, 0x0 }, //... { 0x60F8, 0x0 }, //... { 0x60FB, 0x01}, //... { 0x60FC, 0x01}, //... { 0x60FD, 0x18}, //... { 0x60FF, 0x2 }, //... { 0x4002, 0xF9}, //... { 0x6004, 0x40}, //... { 0x6005, 0x80}, //... { 0x6006, 0x00}, //... { 0x6008, 0x40}, //... { 0x6009, 0x80}, //... { 0x600A, 0x00}, //... { 0x600C, 0xFF}, //... { 0x600D, 0x01}, //... { 0x6010, 0xAA}, //... { 0x6012, 0x00}, //... { 0x4001, 0x00}, //... { 0x4002, 0x01}, //... { 0x4003, 0x01}, //... { 0x4004, 0x20}, //... { 0x6048, 0x00}, //... { 0x4004, 0x61}, //... { 0x4003, 0xF0}, //... { 0x4002, 0x01}, //... { 0x4001, 0x00}, //... { 0x6078, 0x0 }, //... { 0x607C, 0x0 }, //... { 0x6080, 0x0 }, //... { 0x608C, 0x40}, //... { 0x608D, 0x80}, //... { 0x608E, 0x00}, //... { 0x6090, 0xFF}, //... { 0x6091, 0x01}, //... { 0x6074, 0x1 }, //... { 0x6088, 0x00}, //... { 0x6070, 0x01}, //... { 0x6084, 0x00}, //... ///ADC32RF42/ConfigFiles_ADC32RF42_ NYQUIST1/NL_Config_Nyq1_chB_Band_0_250M.cfg //ADC32RFxx_LOWLEVEL { 0x4003, 0x00}, //chB Non Linearity Trims for Nyq1. Remember the sequence of programming the config files is Powerup_Analog_Config-->IL_Config_Nyqx_chA-->IL_Config_Nyqx_chB-->NL_Config_Nyqx_chA-->NL_Config_Nyqx_chB-->JESD_Config { 0x4004, 0x20}, //... { 0x4002, 0xF9}, //... { 0x6018, 0x26}, //... { 0x6019, 0x10}, //... { 0x602F, 0x1f}, //... { 0x6030, 0x11}, //... { 0x6046, 0x26}, //... { 0x6047, 0x10}, //... { 0x605D, 0x1f}, //... { 0x605E, 0x11}, //... { 0x6074, 0xfa}, //... { 0x6075, 0xfe}, //... { 0x608B, 0xf9}, //... { 0x608C, 0xfe}, //... { 0x60A2, 0xfa}, //... { 0x60A3, 0xfe}, //... { 0x60B9, 0xf9}, //... { 0x60BA, 0xfe}, //... { 0x60D0, 0xfe}, //... { 0x60D1, 0x0 }, //... { 0x60E7, 0x0 }, //... { 0x60E8, 0x0 }, //... { 0x60FE, 0xfe}, //... { 0x60FF, 0x0 }, //... { 0x4002, 0xFA}, //... { 0x6015, 0x0 }, //... { 0x6016, 0x0 }, //... { 0x602C, 0xFF}, //... { 0x602D, 0x00}, //... { 0x602E, 0x0 }, //... { 0x602F, 0x0 }, //... { 0x6030, 0x0 }, //... { 0x6033, 0x01}, //... { 0x6034, 0x01}, //... { 0x6035, 0x18}, //... { 0x6037, 0x2 }, //... { 0x603C, 0x40}, //... { 0x603D, 0x80}, //... { 0x603E, 0x00}, //... { 0x6040, 0x40}, //... { 0x6041, 0x80}, //... { 0x6042, 0x00}, //... { 0x6044, 0xFF}, //... { 0x6045, 0x01}, //... { 0x6048, 0xAA}, //... { 0x604A, 0x00}, //... { 0x4001, 0x00}, //... { 0x4002, 0x01}, //... { 0x4003, 0x01}, //... { 0x4004, 0x20}, //... { 0x6049, 0x00}, //... { 0x4004, 0x20}, //... { 0x4003, 0x01}, //... { 0x4002, 0x06}, //... { 0x4001, 0x00}, //... { 0x6084, 0x3F}, //... { 0x6086, 0x3F}, //... { 0x4004, 0x61}, //... { 0x4003, 0xF1}, //... { 0x4002, 0x01}, //... { 0x4001, 0x00}, //... { 0x6078, 0x0 }, //... { 0x607C, 0x0 }, //... { 0x6080, 0x0 }, //... { 0x608C, 0x40}, //... { 0x608D, 0x80}, //... { 0x608E, 0x00}, //... { 0x6090, 0xFF}, //... { 0x6091, 0x01}, //... { 0x4004, 0x61}, //... { 0x4003, 0xF1}, //... { 0x4002, 0x01}, //... { 0x4001, 0x00}, //... { 0x6074, 0x1 }, //... { 0x6088, 0x00}, //... { 0x6070, 0x01}, //... { 0x6084, 0x00}, //... { 0x4001, 0x00}, //... { 0x4002, 0x00}, //... { 0x4003, 0x00}, //... { 0x4004, 0x68}, //... { 0x6068, 0x00}, //... { 0x0011, 0x00}, //... { 0x0012, 0x04}, //... { 0x005c, 0x07}, //... { 0x0012, 0x00}, //... ///ADC32RF42/ConfigFiles_ADC32RF42_ NYQUIST1/JESD_Config.cfg //ADC32RFxx_LOWLEVEL { 0x4002, 0x00}, //JESD Interface Programming. Remember the sequence of programming the config files is Powerup_Analog_Config-->IL_Config_Nyqx_chA-->IL_Config_Nyqx_chB-->NL_Config_Nyqx_chA-->NL_Config_Nyqx_chB-->JESD_Config { 0x4003, 0x00}, { 0x4004, 0x69}, { 0x6002, 0x0F}, // enable LMFS=42810 12-bit mode { 0x7002, 0x0F}, { 0x6037, 0x01}, // PLL DIV mode to 8 0x01 { 0x7037, 0x01}, //Not in the procedure in the setup files, but it is for the DDC files... //Disable SYSREF { 0x0012, 0x04 }, //master select { 0x0020, 0x10 }, //power down sysref 0x10 { 0x0012, 0x00 }, //master select };