Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

HTU21D example does not work in release mode #256

Closed
forGGe opened this issue May 15, 2017 · 8 comments
Closed

HTU21D example does not work in release mode #256

forGGe opened this issue May 15, 2017 · 8 comments

Comments

@forGGe
Copy link
Collaborator

forGGe commented May 15, 2017

See analyser output:

2017-05-13-003054_933x138_scrot

@rasendubi
Copy link
Collaborator

I'll decipher what happens:

  • The first two types issue a soft reset command, so device goes down.
  • The third and last byte is a start of a temperature read command.

It fails because the device did not answer with an ACK (due to it being resetting). Now the I2C driver is waiting for a Master Transmitter Mode Selected event, which never occurs due to the error.

This issue directly relates to #19. I would say, this issue is an instance of absent error handling.

A fast workaround is to add a ~15ms delay to allow HTU21D complete reset before issuing the read command.

@forGGe
Copy link
Collaborator Author

forGGe commented May 15, 2017

A fast workaround is to add a ~15ms delay to allow HTU21D complete reset before issuing the read command.

@Dubland, since you are working on #183 , it will be useful to you also check @rasendubi's workaround.

@rasendubi
Copy link
Collaborator

ping @Dubland ?

@Dubland
Copy link
Collaborator

Dubland commented Jul 1, 2017

With delay after soft reset example working fine. Shall I create PR for adding the delay?

Also, need to swap RX and TX for UART-to-USB converter in the documentation.

@rasendubi
Copy link
Collaborator

Shall I create PR for adding the delay?

Yes please.

@forGGe
Copy link
Collaborator Author

forGGe commented Jul 2, 2017

@Dubland now, when #271 is merged, I propose to try find real root cause and fix it. @rasendubi can guide you trough it.

@forGGe
Copy link
Collaborator Author

forGGe commented Aug 1, 2017

@Dubland any news?

@forGGe
Copy link
Collaborator Author

forGGe commented Oct 11, 2017

Implement in #279 Thanks to @Dubland !

@forGGe forGGe closed this as completed Oct 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants