- Notifications
You must be signed in to change notification settings - Fork1k
Add SoftwareSerial#627
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
DIYMROE STM32F407VGT toDIYMORE STM32F407VGT
Library can provide a precompiled library.See precompiled option here:https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-formatThe .a(archive)/.so(shared object) file must be located at: `src/{build.mcu}`So the `build.mcu` could not contain `fpu` and `float-abi` optionsand should only contain `cortex-mx` value.Else Arduino IDE, instead of searching `cortex-mx`, searches`cortex-mx -mfpu=fpv4-sp-d16 -mfloat-abi=hard` if floating-pointoptions are set.`build.flags.fp` has been added to contain floating-point options if any.Fixesstm32duino#606Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Mistake on the silkscreen of the board. Vendor ishttps://www.diymore.cc.https://www.diymore.cc/products/stm32f4-discovery-stm32f407vgt6-microcontroller-32bit-flash-mcu-arm-cortex-m4-core-development-board?_pos=1&_sid=68a700bf4&_ss=r=Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
ABOSTM commentedSep 4, 2019
Hi@armint, |
ABOSTM left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
In order to do like arduino with its SoftwareSerial,
could you move the files
from
cores\arduino
to
libraries\SoftwareSerial\
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
armint commentedSep 4, 2019
@ABOSTM Thank you for the review! I have modified the code to address the issues |
Uh oh!
There was an error while loading.Please reload this page.
| active_out =nullptr; | ||
| // When in half-duplex mode, we wait for HALFDUPLEX_SWITCH_DELAY bit-periods after the byte has | ||
| // been transmitted before allowing the switch to RX mode | ||
| }elseif (tx_bit_cnt >10 + HALFDUPLEX_SWITCH_DELAY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think that if 5 bits are required you need (
- HALFDUPLEX_SWITCH_DELAY * OVERSAMPLE (old style when send() check if (--tx_tick_cnt <= 0))
- (HALFDUPLEX_SWITCH_DELAY * OVERSAMPLE) - 1 (new style with if (--tx_tick_cnt < 0) )
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
stas2z commentedSep 6, 2019
Tested it with Nucleo F103 (where S is what was recieved from user console, MS - Software serial recieved from hardware serial, S2 - hardware serial received from software serial, serials are hardwired on the board (rx->tx)) |
ABOSTM commentedSep 9, 2019
Hi@armint, |
fpistm commentedSep 11, 2019
Closed by#645 |
Summary
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.
Fixes#267