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.

HDC3020-Q1: Inquiry regarding Auto Measurement Mode

Part Number: HDC3020-Q1
Other Parts Discussed in Thread: HDC3021

Tool/software:

Dear Ti team, 

As I have understood from the HDC302X datasheet and user's guide, when using auto measurement mode, each conversion starts in a determined frequence, let's say 1Hz. Each second a new conversion is triggered, and it takes about 15ms in the slowest power mode. If my code does a readout of the sensor every two seconds, I should read the last measurement done by the HDC302X which is sored in the conversion register.

However, as the datasheet states, "As in Trigger-On Demand, if the I2C controller attempts to read the measurement results prior to measurement completion, the HDC302x responds with a NACK condition." So I should never try to read the converted value while the conversion is ongoing. The user's guide also states "the user should issue command code 0xE0 0x00 at coinciding time intervals to read out the temperature and relative humidity measurement values." Where I am assuming "coindiding times" means to never try readout while the conversion is ongoing. 

So my concern is that the cycle of readouts every two seconds and the auto measurement mode every one second can eventually overlap, causing that the readout attempt happens while the sensor is making its conversion, giving a NACK and therefore losing data. One solution that would help is to have some feedback from the sensor to indicate when a conversion is taking place and when it has finnished, so I can read in these coinciding times.

Am I making he correct assumptions? Or for some reason I am missing I should never get a NACK? 

Thank you in advance for the support

  • Hello Albert,

    You shouldn't lose any data if you get a NACK when trying to read the measurement before it's ready. You would just have to make another attempt to read the data whenever it is ready.

    Have you observed this behavior while testing with an HDC3021 device?

    Regards,

    Harry

  • Dear Harry, 

    Thank you for the clarification. Then I will have to check each message for a NACK and when this occurs, I'll have to ask again for the last measurement after around 20 ms to ensure conversion has been done.