-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very long and unreliable startup, unreliable reading #8
Comments
Using an oscilloscope I determined that the responses from the DS18B20 were valid but for some reason not read correctly by the STM32. I'll keep watching the device, if the problem is solved we can consider this issue closed but I suggest adding a note to library readme to point out that the task priority can be an issue. |
Unfortunately, increasing the priority only seemed to fix the issue - it worked for some time but today the same code doesn't read the temperatures correctly (i get only one valid read in a dozen). The problem lies somewhere else and the DS18B20 is still unusable. Therefore, the issue is still open... |
Hi,
I am using your code with STM32F411 (disco board) and some chinese probe based on DS18B20.
I am using CubeIDE but I've modified a few places in code to let is find all definitions and I've got the code running.
However, the temperature read from DS18B20 is extremely unstable and unreliable, making the sensor totally unusable.
The task is called as it should be, the DS18B20 address is detected correctly (I can see the address in the debug), usually the temperature is read correctly once and then the data is not read (isValid=0) for dozen seconds (sometimes minutes). After this time the data is read once again and then is invalid again.
Sometimes the situation is even worse - I don't even get the address of the DS18B20.
I lowered the update interval timeout to 1000ms but this doesn't seem to cause the issue because I have the same problems when the timeout is set to 10000ms or even 20000ms.
Is there something I am missing which causes these problems? Can this be made more reliable some way?
EDIT - after some debugging I see that the issue is the CRC which is invalid (crc is not equal to data[8]). There are values within data[] are partially just series of 1s like this:
The text was updated successfully, but these errors were encountered: