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.

HDC2010: INT pin only activated by high temp threshold excess ?

Part Number: HDC2010

Hi,

I have strange behavior with INT:

I used this video and downloaded library in comment. Then I start porting library to STM32L0 (in C). I think there is a mistake in table 22 for bits 3, 4, 5, 6 the enable level should be 1. The field names are also wrong in table 16 (6/5<->4/3 - already pointed in another thread with updated datasheet expected end 2017).

My issue is that only the HIGH temperature threshold makes the INT pin go HIGH. I can see in 0x04 (INT_STATUS) register that the low temp or humidity thresholds excess are well seen but doesn't "reflect" on the INT pin ;(

My reg CFG:

0x07 : 0x78

0x0E : 0x57

0x0F : 0x00

When 0x04 = 10 (humidity threshold high int) the INT pin is still read LOW.

When 0x04 = 50 (humidity and temperature threshold high int) the INT pin goes HIGH (as expected). It's like the INT pin reflects the 0x04 bit 6 instead of expected logical OR between bits 3, 4, 5 and 6.

Any idea?

  • Hi Thomas,
    As you noticed already In Table 16, (Address 0x04 Interrupt DRDY) the Description column is correct. The Field column, which repeats the information in Table 15, is incorrect. We should update the data sheet soon. Your understanding of 0x04 is correct.

    0x07 settings seems to be wrong: based on table 22 [6;3]=0000 to enable the interrupts. Why you think is wrong?

    Regards,
    Jose
  • Hi,

    Thanks for reply, I think its wrong because:

    1) with  [6;3]=0000 the INT pin does not react at all

    2) the provided library uses [6;3]=1111:

    // Enables the interrupt pin for comfort zone operation
    void HDC2010::enableThresholdInterrupt(void)
    {

    uint8_t regContents;
    regContents = readReg(INTERRUPT_CONFIG);

    regContents = (regContents | 0x78);

    writeReg(INTERRUPT_CONFIG, regContents);
    }

    3) Why would the logic be inverted in a single register between DRDY and TH, TL, HH, HL MASK ?

    Let me know if you want me to try something else.

    Have you tried HH, HL, TL to drive INT pin? In the video, only TH base interrupt is demonstrated and it works for me as well.

    Thanks for support.

  • Hi Thomas,
    Thanks for the prompt reply. Will add table 22 to be updated as well, makes sense since the Arduino library is configured like that.
    Will check the HH/HL/TH/ and return with an answer next week.

    Regards,
    Jose
  • Hi Thomas,

    With respect to register 0x07, please note that there is a priority in which way the interrupts bits work. The priority is such as TH>TL>HH>HL. So TH is highest priority and HL is lowest. If any of these 4 bits is set, bit setting of lower priority bits will be ignored, that is why in your seetings of 0x07=0x78 TH drives the INT line and others are ignored.

    If you make 0x07 = 0x18, then HH will be able to affect INT pin.

    Regards,
    Jose
  • Thanks for this quick update,

    this behavior is not described in the datasheet (and is imho totaly crap :x, the whole point of using mask is to activate or not the threshold of interest) !

    Luckily this is not critical in my application but you should quickly update the datasheet on this point.

    If I want the "out of confort zone" alerte (promoted in the video) I need to change 4 times configuration of reg 0x07 and do 4 measurements right ?