Seeed-Studio / Seeed_SHT35

MIT License
7 stars 7 forks source link

Doesn't handle clock stretching correctly #3

Closed Mike4U closed 4 years ago

Mike4U commented 5 years ago

When using

define HIGH_REP_WITH_STRCH 0x2C06

and example sketch it inits ok but can't read. Sometimes it will work until I power cycle. Changing to any of the 0x2400 no stretch settings works. Oscilloscope shows no clocking or data after SCL held low and release with 0x2C06. 0x2C0D and 0x2C10 work for some reason. 0x24XX always works.

Pillar1989 commented 4 years ago

How do I reproduce this problem?If I can reproduce, I think I can help you

Mike4U commented 4 years ago

I'm using a Teensy 3.6 with your example code. Always inits but 1st read is sometimes random with error 2. Once it works (usually with 0x2C0D or 0x2C10) it will keep working for a while. Any no stretch setting works reliably.

Pillar1989 commented 4 years ago

Have you ever tested arduino uno? Could it be the problem of communication between 3.3v and 5v

Pillar1989 commented 4 years ago

I'm going to close the issye, and if you need to discuss it later, you can open it again.