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.

LDC1614: INTB Routine

Part Number: LDC1614

Hello There,

I am using LDC1614EVM i2c interface with Teensy 4.1 to read data.

LDC1614 works but once I want to use INTB routine it does not behave as it supposes to.

I can either read correctly data without ISR or I can set ISR but data does not make any sense.

I set only these two registers and everything else is in default:

Address 0x19, ERROR_CONFIG: 0x0001 Data Ready Flag to INTB (FIELD: DRDY_2INT)
Address 0x1A,                CONFIG: 0x0601 - Perform cont. conv. CH0;Active mode; Override off; Full current; Amplitude control disab.; Ref. oscl.; INTB enabled; High curr. Ch0;

Once I read data with this configuration it normally response to target but not INTB ever appear. Data ranging: 838873600 - 3204497152

If I read with data read code Address 0x18, STATUS, INTB starts to work but read data does not make sense: either 134236160 or 1207977984

INTB should always be disserted once MSB data are read and asserted again when new conversion is ready, correct? 

To be able to use INTB service routine what sequence should be followed?

Thank you for help,

Michael 

  • Hello Michael, 

    You are correct, INTB will deassert after reading the STATUS register and will not re-assert until the next conversion is ready. 

    As for the data that is different, do you see the same issue if you change the automatic amplitude correction back to enabled? If so, can you take an oscilloscope capture of the sensor oscillation in both cases to make sure the sensor is operating correctly. 

    Best Regards, 

    Justin Beigel

  • Hello Justin,

    I checked you suggestion. No matter whether automatic amplitude correction is on/off it does not influent sensor oscillation performance.

    here it is with automatic amplitude correction on:

    here it is with automatic amplitude correction off:

    This is written in manual:

    8.1.8 Device Status Registers (p.47, SNOSCY9A)
    ...
    When a bit field in the STATUS register is set, the entire STATUS register content is held until read or until the
    DATAx_MSB register is read. Reading also de-asserts INTB. After first starting conversions in active mode, the
    first read of STATUS should performed be after assertion of INTB.
    Interrupts are cleared by one of the following events:
    1. Entering Sleep Mode
    2. Power-on reset (POR)
    3. Device enters Shutdown Mode (SD is asserted)
    4. S/W reset
    5. I2C read of the STATUS register: Reading the STATUS register will clear any error status bit set in STATUS
    along with the ERR_CHAN field and de-assert INTB

    I checked it again.

    When I do not read status register, I do not see any interrupt but I do get correct data.

    When I read status I see interrupts but I do not get correct data.

    Why do I need to read STATUS register at all? Reading MSB Data should de-assert INTB anyway?

    It seems that reading Status somehow clears the Data. What should be read first and what is correct sequence?

    Thanks,

    Michael 

  • Hello Michael, 

    Reading the MSB data won't necessarily clear the DRDY bit in the STATUS register which is what will release the INTB pin in this case. Having the STATUS bit reset the data registers should not be happening. For the I2C reads, are you just reading the data register and status register? You could try reading the STATUS register at the end of the read as well. 

    When you do read the STATUS register, does the UNREADCONV0 bit properly show there is a result ready? 

    Best Regards, 

    Justin Beigel

  • Hello Justin,

    yes, reading reg 0x00, 0x01 and 0x18.

    When I read STATUS I get LSB 72 which is 1001000 which corresponds to UNREADCONV0 - 1 and DRDY - 1, so that is correct.

    Strange is, that once I read all three registers then I do see data change at Status register no at Data registers. I believe that there is some very basic problem by reading I2C. I plan to switch to something else, ideally TI MCU.

    I will update this once I know more.

    Thank you for your help at this moment.

    Michael

  • Hello Michael, 

    Looking forward to your update. 

    In the meantime, since you are having issues with the data registers, I also wanted to make sure you where aware of the following when reading these registers: 

    Best Regards, 

    Justin Beigel