This repository was archived by the owner on Sep 16, 2024. It is now read-only.
modpycom.c/pulses_get(): prevent lock-up at long pulses#110
Closed
robert-hh wants to merge 1 commit intopycom:masterfrom
robert-hh:pulses_get
Closed
modpycom.c/pulses_get(): prevent lock-up at long pulses#110robert-hh wants to merge 1 commit intopycom:masterfrom robert-hh:pulses_get
robert-hh wants to merge 1 commit intopycom:masterfrom
robert-hh:pulses_get
Conversation
The longest pulse with was set to 20ms. The were some observations that pulses_get() kind of locked up at longer pulses. Setting the maximal pulse width to 0xffff avoids this situation. Even it the pulse width is longer than 65ms, the device recovers at shorter pulses. This value is also used by espressif's examples.
|
Merged with master, thanks! |
Contributor
Author
|
B.T.W.: Merry Christmas |
|
Merry Christmas!! :-) |
Merged
X-Ryl669
pushed a commit
to X-Ryl669/pycom-micropython-sigfox
that referenced
this pull request
May 12, 2023
1.20.2.rc6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pulses_get() gets into a kind of lock state, if pulses with a duration of > 20000µs are applied and the time out was set to an appropriate large value, like 30000. It does not simply return wrong values, but from one "overflow" event on it returns the value pair 19879, 0 irrespective of the signal applied to the input. Only hard reset fixes that.
This PR results in a more robust behavior. For pulses of > 32768µs a wrong value will be reported, but after returning to shorter pulses, these will be reported correctly.