You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm analyzing HardwareSerial library, inside begin method i've seen that the variable databits can assume from config the values 6,7,8, but HAL library supports only 7,8,9 data bits. Should the defined configurations be changed and subsequently change the if inside begin method?
Ok sorry, my fault. In any case, for a generic user, it seems that 9 data bits are not achievable by the library, because both defined config miss and databits cannot be 9.
Ok... i believe that it would better implement it because STM32 is a very powerfull uC. If the software philosopy make it equal as Arduino, why should i use STM32? :) Changing slightly the library, in my current application i use 9 data bits, however it would be fantastic if also less expert people can use the whole STM32 power :)
First goal of this core was to be able to use STM32 based boards with Arduino and to be as more as possible compatible with basics sketches and libraries.
I think this step is achieved 🙄, now core features are/could be extended and also performance/robustness.
All HAL and LL are available at level sketch some advanced user already use it to use further capabilities.
Adding the 9bits support could be a good addition. Do not hesitate to submit a PR.
Any contribution are welcome :)
Activity
fpistm commentedon Mar 25, 2019
6 databits could be managed with a parity bit on some STM32.
Refers to issue #50 and PR #51
Do not mix uart data and uart frame.
Ex for F3, for some device you can have 6 bits + PB:
Arduino_Core_STM32/system/Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_usart_ex.h
Lines 64 to 67 in 7feeb09
Arduino_Core_STM32/system/Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart_ex.c
Lines 115 to 147 in 7feeb09
mrv96 commentedon Mar 25, 2019
Ok sorry, my fault. In any case, for a generic user, it seems that 9 data bits are not achievable by the library, because both defined config miss and databits cannot be 9.
fpistm commentedon Mar 25, 2019
Right, 9 is not achievable.
As Arduino doesn't define it it was not added
https://www.arduino.cc/reference/en/language/functions/communication/serial/begin/
Moreover, HardwareSerial::write allows only uint8_t.
mrv96 commentedon Mar 25, 2019
Ok... i believe that it would better implement it because STM32 is a very powerfull uC. If the software philosopy make it equal as Arduino, why should i use STM32? :) Changing slightly the library, in my current application i use 9 data bits, however it would be fantastic if also less expert people can use the whole STM32 power :)
fpistm commentedon Mar 25, 2019
First goal of this core was to be able to use STM32 based boards with Arduino and to be as more as possible compatible with basics sketches and libraries.
I think this step is achieved 🙄, now core features are/could be extended and also performance/robustness.
All HAL and LL are available at level sketch some advanced user already use it to use further capabilities.
Adding the 9bits support could be a good addition. Do not hesitate to submit a PR.
Any contribution are welcome :)
fpistm commentedon Apr 2, 2019
Close it as no issue.