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.

Problem in integrating ldc1000 into MSP430fg4618

Hi,

I have two LDC1000 chips in my system. But for now I am using only one of them, which gets selected by chip select . I am not using any interrupt vector. After Initialization, I am getting 0000 on reading data registers 0x21-0x25. Can anyone please tell me what am I missing? Following are the details of my program:

Initializing LDC1000 with following values:

LDC1000_CMD_RPMAX:               0x12
LDC1000_CMD_RPMIN:                0x0A
LDC1000_CMD_SENSORFREQ: 0x94
LDC1000_CMD_LDCCONFIG:     0x17
LDC1000_CMD_CLKCONFIG:     0x00
LDC1000_CMD_INTCONFIG:       0x02

LDC1000_CMD_THRESHILSB:    0x50
LDC1000_CMD_THRESHIMSB:   0x14
LDC1000_CMD_THRESLOLSB:   0xC0
LDC1000_CMD_THRESLOMSB:   0x12

LDC1000_CMD_PWRCONFIG:      0x01

Program :

int  main(void)

{

uint8_t data[4];              // data buffer
uint16_t proxData;       // data to print
uint16_t freqData;        // data to print

WDTCTL = WDTPW+WDTHOLD; // Stop watchdog timer

SCFQCTL |= 0x3F;                   // N = 63, DCO freq = 32.768 * (63+1)=2MHz
SCFI0 &= ~0x40;                      // D = 1, DCO Freq = 32.768 * (63+1) * 1 = 2.097 Mhz. Range is 0.65 to 6.1 MHz
FLL_CTL0 |= XCAP14PF;      // Configure load caps for 32K Crystal
FLL_CTL0 &= ~0x80;             //DCO Output is divided
FLL_CTL1 &= ~0x44;             // SMCLK 0n and SMCLK = DCO

// initialize LDC1000 
evm_init();                    // Outputs SMCLK to LDCLK, Inits LDC1000

// set EVM_INT pin to DRDY function
spi_writeByte(NULL, LDC1000_CMD_INTCONFIG, 0x04);

while(1){

spi_readBytes(NULL, LDC1000_CMD_PROXLSB, data, sizeof(data));
proxData = data[0] | (data[1] << 8);                   // buffer proximity data
freqData = data[2] | (data[3] << 8);                   // buffer frequency counter data
printf("%d,%d\r\n",proxData,freqData);           // print data

      }

}