Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SoftwareSerial implementation#645

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 5 commits intostm32duino:masterfromABOSTM:SoftwareSerial
Sep 11, 2019

Conversation

@ABOSTM
Copy link
Contributor

@ABOSTMABOSTM commentedSep 9, 2019
edited by fpistm
Loading

Summary

This Pull Request is based on PR: Add SoftwareSerial#627 from@armint:
Add SoftwareSerial for STM32 boards.

This PR adds SoftwareSerial support for STM32 boards. The code was based on the SoftwareSerial implementation from the lpc176x arduino port and adapted for STM32. It uses the recently added HardwareTimer code for timing. The timer to be used can be defined in variant.h by defining TIMER_SERIAL. When no TIMER_SERIAL is defined it will use the simplest timer available.
Tested and working on STM32F446ZE and STM32F401RE. Works with existing SoftwareSerial example code. Tested at 9600 and 115200 baud by communicating with hardware serial interfaces and by logic analyser.

Besides PR#627, I also

  • remove the actual oversampling because I already have issue with baudrate 115200 (on NUCLEO_STM32L476RG @ 80MHz) because I spend 100% CPU load in intterrup, waiting for some RX. And thus unable to handle TX even when nothing is received. And actual oversampling would increase Interrupt overhead.
  • keep original (lpc176x) OVERSAMPLING management to sample in RX in the middle of the bit.
  • add some comment to explain the management of bits/tick

Tested on NUCLEO_STM32L476RG: up to Baudrate 57600 test passed. Failed at 115200(too much time spend in IT).
Both examples working:

  • SoftwareSerialExample
  • TwoPortReceive

Fixes#267

@fpistmfpistm self-requested a reviewSeptember 9, 2019 14:50
@fpistmfpistm added this to the1.7.0 milestoneSep 9, 2019
@ABOSTMABOSTM mentioned this pull requestSep 9, 2019
* fix build warnings* fix to allow pin number 0* fix listen to do what it is expected* add a check on _receivePin and _transmitPinSigned-off-by: Frederic Pillon <frederic.pillon@st.com>
Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fpistmfpistmfpistm approved these changes

Assignees

@ABOSTMABOSTM

Labels

arduino compatibilityenhancementNew feature or request

Projects

None yet

Milestone

1.7.0

Development

Successfully merging this pull request may close these issues.

SoftwareSerial needed

3 participants

@ABOSTM@fpistm@armint

[8]ページ先頭

©2009-2025 Movatter.jp