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:
- Write sensor configuration: x80/x02/x10/x00
- Write the pointer to trigger the measurement: x80/x00
- 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!