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.

HDC1010: I2C interfacing debug

Part Number: HDC1010

Hey Team,

Dan is working with our HDC1010 and STM32F407. He's configured the I2C interface to run at 14kHz, SM mode. Dan is using the following sequence to read the sensor:

  1. Write sensor configuration: x80/x02/x10/x00
  2. Write the pointer to trigger the measurement:  x80/x00
  3. If DRDY is asserted, read the measurement: x81/xdd/xdd/xdd/xdd

The micro is configured to interrupt on TXE, RXNE, or ERROR. Under this configuration, it works most of the time, but they get errors, probably about one error roughly every 50-100 readings errors. The error rate is inconsistent, but it does happen enough to be of concern. Most of the errors occur with the AF flag in the Status register of the micro set. The AF flag is a “no acknowledge” indicator. Some errors are when the DRDY signal is not active when they expect it to be active.

Dan has changed the configuration to interrupt on BTF. This is the “buffer empty” flag. Basically, it interrupts when a byte transmission has completed and there isn’t another byte to send. He did this to better control asserting the Stop state. After the last byte has been sent, he asserts the Stop bit in the micro. With this approach, he doesn't get any I2C errors, but the DRDY signal never gets asserted.

They have a 10k pullup resistors on the lines, and are running so slowly that it's assumed they're not violating any setup or hold times. I'm not sure if this has been verified though.

Is there something Dan is missing? Could you help to debug what is going on here?

I've shared this link with Dan and he may be able to share more info if you have questions. Thank you!

  • Hi Dajon, Dan, 

    After triggering a measurement (step 2), I suggest releasing the line for the duration of the conversion time (no stop) and then send a repeated start to read data. 

    The total summed conversion time (14-bit resolution) is 6.5msec (humidity) + 6.35msec (temp) = 12.85msec typical. Since this is a typical spec, the conversion could take slightly longer before data is ready, so try increasing the wait time after triggering a measurement by a few msec. This could especially be the case if you are testing at extreme (not ambient) temperatures. Try increasing the wait time to at least 15msec. 

    The HDC1010 is designed to return a NACK when a read operation is attempted if the contents of the registers have not been updated yet. Thus, if the DRDY flag is not asserted yet (data not ready), the NACK behavior is expected. 

    I hope this helps. If this does not solve the issue, please share some i2c scope shots as well as the conditions (supply/temperature/humidity) the device is being tested at.

    Best,

    Sakeenah Khan