Skip to content
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

Several fixes to 1-Wire on ESP32 #1553

Merged
merged 14 commits into from
Feb 13, 2020
Merged

Conversation

up-streamer
Copy link
Contributor

@up-streamer up-streamer commented Feb 12, 2020

Description

  • Add missing configuration for the GPIO pin as Open Drain.
  • Fix lockup on search loop.

Motivation and Context

This is necessary to make 1-Wire bus work correctly on ESP32.

How Has This Been Tested?

It was tested by connecting three 18B20 sensors, In C#, looping to get the address and than looping to read each one temperature.
This also remove the need of a Open-drain or Open-Collector non inverter drive on UART TX output pin.
The 4.7k pull up resistor on 1-Wire bus is now mandatory as per 1-wire protocol.

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: Up-Streamer [email protected]

Modification on Scripts for first build.
Added script build fail
Modify Gpio UART TX mode to OPEN-DRAIN as per 1-wire specs.
Fix instability and loops when searching and more than two devices connected.
@nfbot
Copy link
Member

nfbot commented Feb 12, 2020

Hi @up-streamer,

I'm nanoFramework bot.
Thank you for your contribution!

A human will be reviewing it shortly. 😉

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Please just remove the other 2 files besides the 1Wire controller one. They don't belong to this PR.

@josesimoes josesimoes added Series: ESP32 Everything related specifically with ESP32 series targets Type: bug labels Feb 13, 2020
Copy link
Contributor Author

@up-streamer up-streamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unecessary files for this PR

@josesimoes
Copy link
Member

For some reason the CMakeSettings.json file is still showing…
Make sure you revert any changes to it. The file is not to delete.

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

(I've reverted the changes in the cmake json file myself)

@josesimoes josesimoes changed the title Fix ESP32 1-Wire Opened Issues Several fixes to 1-Wire on ESP32 Feb 13, 2020
@josesimoes josesimoes merged commit 5d3f4f9 into nanoframework:develop Feb 13, 2020
@up-streamer
Copy link
Contributor Author

Thanks!
I have recoverted to my previous CMakeSettings.json, I deleted but the original was lost in my attempts to build it.
Thanks for better title too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Series: ESP32 Everything related specifically with ESP32 series targets Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instabilities on 1-Wire when seaching devices UART pins aren't configured correctly to use 1-Wire
3 participants