-
Notifications
You must be signed in to change notification settings - Fork 14
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
Can't find devices #3
Comments
Another finding: If I don't connect the data pin at all, I actually get devices but unrecognized:
and this go on and on ad infinitum. |
@riaqn try to set frequency of MCU, something like this:
after this line: |
@chernomor Thanks for the reply. I did this change; now it's
which is not exactly what you said but I need to convince the borrow checker. However the error persist. |
Hmm, I had similar issues, when I had it run the debug artifact and when I had semihosting in use. Could you try it without that and in release mode? Maybe blink an LED depending on the result... |
@kellerkindt Well. the problem is that I kind of need semihosting to print something to see if it's working. but I guess I can use the serial instead. I will try this out later. EDIT: |
@kellerkindt OK so I tried it with semihosting off (out of EDIT: ok obviously I need to run I will try this with semihosting on. EDIT: so even with semihosting on it still works. So the problem seem to be just release mode vs debug mode. I don't know why. Maybe someone could explain to me. |
FWIW, I stuck a logic analyser on the example code (and also added some debugging with itm) I got: rustc 1.36.0-nightly (5d20ff4d2 2019-04-18) development build shows a brief 32µs pull down, followed 140µs later by a 604µs reset pulse (with the correct presence response), followed 8.97ms later by another 604µs reset pulse (and correct presense response). There's then nothing else (debug output shows the search complete, but the bus never went low again. rustc 1.36.0-nightly (5d20ff4d2 2019-04-18) release build shows a 6µs initial pulldown, followed 6µs later by a 484µs reset pulse (with 104µs presence response), followed 486µs later (much quicker) by another 484µs reset pulse and response. The search sequence starts 416µs later. |
@tim-seoss Thanks for the investigation. Let's wait someone familir with Cargo to explain. |
It seems rust version is important, I build my project with nightly-2018-11-01. Next builds (december or january) don't works, so I return to nightly-2018-11-01. |
Yeah, I used release version of rust, 1.31 I believe.
…On Fri, Apr 19, 2019 at 10:32 AM Sergey Chernomorets < ***@***.***> wrote:
It seems rust version is important, I build my project with
nightly-2018-11-01. Next builds (december or january) don't works, so I
return to nightly-2018-11-01.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASZEVUC5MJINRC7AA7YWQLPRHJXVANCNFSM4HENO7ZQ>
.
|
FWIW, it looks like
in Cargo.toml gets it working, but the other options like |
OK so my guess is that un-optimized code is too slow and screwed up some time-sensitive initialization? |
I don't think that explains the behaviour that I was seeing with the signal analyser (edit: actually perhaps it's missing the presence pulse because it's not sampling it soon enough? I'll check.) |
Hmm. Because of similar issues I once had (as mentioned above) similar timing issues. I would like to refactor the sleeping/timing part, using the Am I missing something? |
I'm not at all sure, but depending on what you have in mind, I suppose it might be possible to have the user supply an optional closure to be used for higher resolution sleeping/timing? |
Hey guys, I'm again having this issue (no device found), here is my Cargo.toml:
rustc version is 1.35.0 (this is what I get with |
I tried nightly (1.37.0 20180605) and got the same result. |
@chernomor Could you please post the working |
` [dependencies] [dependencies.stm32f103xx] [dev-dependencies] [build-dependencies] [dependencies.cortex-m] [dependencies.embedded-hal] [profile.release] [features] |
@chernomor Thank you very much. There is lots of things in your file I don't understand.
Also, actually do you mind sharing the whole codebase? I just want to want to make sure my |
I will try to make an example and check it in some days. |
OK I got it working. Obviously I still need the clock trick, as @chernomor mentioned.
Curiously enough, I was able to get away without this in the past. For future record, this is my
this is the
|
I'm trying to run a ds18b20 on my stm32f103. The code is as follows ( pretty much copied from
README
).the program gives me
which means no device is found. But if I remove the 4.7k resistor from the circuit, it will actually complain
missing pullups
, so I assume my circuit connection is correct.The text was updated successfully, but these errors were encountered: