-
Notifications
You must be signed in to change notification settings - Fork 93
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
1-wire: scan does not work with multiple devices #136
Comments
|
I won't be able to look into it this weekend, but this is Maxim's description of the 1-wire rom address search algorithm: https://www.maximintegrated.com/en/design/technical-documents/app-notes/1/187.html |
My impression is that |
Just tried a self-built compiler I had around (I also do buildrobot testing mass-builds of GCC and Binutils), but that's failing:
So I fear I'll need to download the pre-built toolchain. (NB: The |
Note to self: If I can come up with a toolchain based on all |
Yes it is not recommended to build your own toolchain for ARM Embedded GCC and use a validated pre-built one like described in Wiki:
In theory we could also use GNU Arm Embedded Toolchain 8-2018-q4-major or more but I have never validated those toolchains (except through stm32cubeide) and I doubt they bring anything to the hydrafw project (and potentially could have regression like seen in the paste or issues until fully validated with hydrafw)
About python dependency it is planned to be removed to build the firmware see #132 |
@jbglaw Tell me if you want to be assignee to fix that issue as so far I cannot find any DS1820 available and the DS18S20 are also out of stock and very expensive because of chip shortage.
The actual code related to the scan shall be modified and better tested to be fully compliant with 1-Wire Search Algorithm |
At least, I just managed to flash my HydraBus with a self-build (using the provided toolchain) firmware image:
I'm quite sure the scan issue will show up with any 1-wire device, it's just that I had the DS1820 flyin' around from some old projects. Indeed, that very IC is quite superceded by newer versions of that design. As I'm now set-up to build and test the firmware, I'll try to have a look at this. (Though don't expect results for the next few days, multiple birthdays coming up.) |
Well... I ported the sample code:
I'll attach my current patch, but I don't consider this RFP right now:
|
For the "macro" management (with <1> ...) please create an other issue to implement that in the firmware as so far that concept does not exist |
I opened an issue for getting infrastructure for scan results into place. Meanwhile, here's an updated patch. The search state is placed into a struct (instead of global variables). Works for me. I'd appreciate comments on this new patch: onewire-scan.patch.txt. |
Thanks for your contribution the onewire-scan.patch.txt seems good could you do a PR for final review/merge ? |
I will prepare one. That'll also do a final rename of some variables (those still use ugly CamelCase) and I'll prepare two branches: One for just the |
Thanks for the PR #139 |
I bought a HydraBus a few days ago and started to play with it:
The firmware isn't all up-to-date, but I don't have the STM flasher available, so I probably cannot easily update it.
However, as the onewire code didn't change since 2019, I experience issues with the
scan
command, which are probably still valid.pull up
. Maybe that would be a more sensible default thanfloating
?scan
command works with one DS1820 attached:and only finds one of the two.
I'd be willing to hack on this, but I would need to have a programmer, is that right? Flashing over USB or UART does not work?
The text was updated successfully, but these errors were encountered: