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.

Linux/LDC1612: Can't reach i2c buffer after 501 data acquisition

Part Number: LDC1612

Tool/software: Linux

Hello,

I am trying to interface the LDC1612 with Raspberry and I think the data acquisition is OK. However, when I reach 501 data I have an error to open the LDC_I2C_BUS and the slave is unrechable.

I am using :

linux/i2c-dev.h

the configuration is the following :

[[{"idx":0,"id":"data_msb_ch0","value":"0x0fff"},{"idx":1,"id":"data_lsb_ch0","value":"0xffff"},{"idx":2,"id":"data_msb_ch1","value":"0x0fff"},{"idx":3,"id":"data_lsb_ch1","value":"0xffff"},{"idx":4,"id":"rcount_ch0","value":"0x049f"},{"idx":5,"id":"rcount_ch1","value":"0x049f"},{"idx":6,"id":"offset_ch0","value":"0x0000"},{"idx":7,"id":"offset_ch1","value":"0x0000"},{"idx":8,"id":"settlecount_ch0","value":"0x0040"},{"idx":9,"id":"settlecount_ch1","value":"0x0040"},{"idx":10,"id":"clock_dividers_ch0","value":"0x1001"},{"idx":11,"id":"clock_dividers_ch1","value":"0x1001"},{"idx":12,"id":"status","value":"0x000c"},{"idx":13,"id":"error_config","value":"0x0000"},{"idx":14,"id":"config","value":"0x0800"},{"idx":15,"id":"mux_config","value":"0x8209"},{"idx":16,"id":"reset_dev","value":"0x0000"},{"idx":17,"id":"drive_current_ch0","value":"0x0f80"},{"idx":18,"id":"drive_current_ch1","value":"0x0f80"},{"idx":19,"id":"manufacturer_id","value":"0x5449"},{"idx":20,"id":"device_id","value":"0x3055"}]]

I have a 2200 pf capacitor and about 6 uh

I thank you in advance for your help,

Best regards,

  • Hi Christophe,

    During the 500th transaction does the STATUS register indicate any errors?

    Regards,

    Varn.
  • hi Varn,

    I thank you for your answer. It seems that the STATUS register is 0x000c : if I am not mistaken, UnreadConversion for CH0 and CH1.
    I precise thaht I have linked GND of RPI to addr, GND, SD of LDC and INTB & clock are NC. I have 1kOhm resistors between VCC and SCL and VCC and SDA.
    The same configuration with another module LDC1612 evm with MSP430 and GUI (not interfaced with linux) is OK with the setting without error.


    Thank you in advance.

    Best regards,

    Christophe

  • Hi,

    I have find the problem. I forgot to put a close after reading the buffer...

    uint32_t ReadVal(char addr, char reg)
    {
         int fd;
         fd = open( "/dev/mem", O_RDWR );
    
         /* operations on values */
         int val = i2c_smbus_read_word_data(addr,reg);
       
         close(fd);   
    }

    I thank you for the help,

    Christophe