kinetis: LPUART: Compute oversampling rate at init#10320
Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom Dec 3, 2018
Merged
kinetis: LPUART: Compute oversampling rate at init#10320aabadie merged 1 commit intoRIOT-OS:masterfrom
aabadie merged 1 commit intoRIOT-OS:masterfrom
Conversation
9df3f99 to
e84d0b9
Compare
5 tasks
jnohlgard
pushed a commit
to jnohlgard/RIOT
that referenced
this pull request
Nov 5, 2018
squash adjust config to RIOT-OS#10320
e84d0b9 to
d037c5e
Compare
Member
|
The code looks good to me, sadly, I don't have the hardware to test it :-( |
jnohlgard
pushed a commit
to jnohlgard/RIOT
that referenced
this pull request
Nov 27, 2018
squash adjust config to RIOT-OS#10320
By not forcing a fixed oversampling rate we can achieve better baud rate accuracy than otherwise possible. For example, when requesting 115200 with a module clock of 4 MHz, picking an oversampling rate of 17 (instead of hardware default 16) yields 117647 baud instead of 125000 baud as the best matching rate. Better matching baud rate between receiver and transmitter results in a lower probability of transmission errors.
d037c5e to
158a830
Compare
jnohlgard
pushed a commit
to jnohlgard/RIOT
that referenced
this pull request
Nov 29, 2018
squash adjust config to RIOT-OS#10320
aabadie
approved these changes
Dec 3, 2018
Contributor
aabadie
left a comment
There was a problem hiding this comment.
Tested on frdm-kw41z. The examples/default shell works like a charm. I can't do more advanced testing than this one.
The PR was already reviewed codewise and only testing was missing.
ACK and go
riot-ci
pushed a commit
to riot-ci/RIOT
that referenced
this pull request
Oct 22, 2020
squash adjust config to RIOT-OS#10320
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Contribution description
By not forcing a fixed oversampling rate we can achieve better baud rate
accuracy than otherwise possible.
For example, when requesting 115200 with a module clock of 4 MHz,
picking an oversampling rate of 17 (instead of hardware
default 16) yields 117647 baud instead of 125000 baud as the best
matching rate. Better matching baud rate between receiver and
transmitter results in a lower probability of transmission errors.
Testing procedure
Flash frdm-kw41z with a shell application
Test that the shell works correctly when using the default BAUD settings (115200)
The expected baud rate is around 117000 with this PR, 125000 without this PR. The USB to UART adapter in the dev board does handle the rate mismatch even for 125000, but there is a smaller margin for error.
Issues/PRs references
split from #7897