Skip to content

Can not set a Serial charater format of 7 data bit + parity on STM32 board after patch #4189. #5881

@Roietronics

Description

@Roietronics

Description

Can not set a Serial character format of 7 data bit + parity on STM32 board after patch #4189, STM32s
Serial does not properly handle parity bits.
Please see Discussion post on mbed bug forum with the same title for more details

  • Type: Bug
  • Related issue:
  • Priority:| Major
    Pull request with patch coming

Bug

Target
SMT32?????

Toolchain:
all
Toolchain version:
all
mbed-cli version:

5.4.7
mbed-os sha:
(git log -n1 --oneline)

DAPLink version:

Expected behavior
8 bit serial character with 7 data bits and a Parity bit as the msb
Actual behavior
9 bit serial character with 7 data bit a parity bit as the msb and a random bit between the 7th data bit and the parity
Received characters are 9 bits with a random msb
Steps to reproduce
Call the Serial format method with the follow argument (7,SerialBase::Even, 1) for a target board using a microcontroller from the STM32 family
Send a character and observe the bit pattern on the line
Send a character to a device which expects characters with 7 data bit and a parity bit and observe framing error
Send a character which require the parity bit to set for even parity to the same device and observe a parity error

read a character sent to the board from device which transmits a 8 bit character with 7 data bits and parity and observed 9 bit character high since its was the stop bit

Send a string of character to the board from a device sending 8 bit characters with one stop bit and observe a line hang since there is no stop bit before the next start bit. The stop bit having been clocked in as UART as the msb of a nine bit character

Enhancement

Reason to enhance or problem with existing solution

Suggested enhancement

Pros

Cons


Question

How to?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions