2009-09-20 11:25 PM
Framing error and Break char
2011-05-17 04:24 AM
I need to be able to separate a break char from a true framing error.
When STM32 recives a break char (byte value = 0), it generates a framing error. In the datastream I recive, there occur ''real frame errors'' that I need to be able to detect and handle. Do anyone have any suggestions??2011-05-17 04:24 AM
Quote:
I need to be able to separate a break char from a true framing error.
But, surely, a ''Break'' is not a character? A ''Break'' condition is when the line is held in the Spacing state for longer than</i> one complete frame. This does, of course, constitute a framing error...
Quote:
Do anyone have any suggestions??
Separately monitor the line to detect when a true Break occurs?
2011-05-17 04:24 AM
To detect a Break you can use combination of framing AND receiving character 00. If character is other than 00, this is a normal framing error.
2011-05-17 04:24 AM
Quote:
To detect a Break you can use combination of framing AND receiving character 00.
But you are still left with the problem to distinguish a framing error on a genuine NUL character (a byte with value 0) from a true BREAK signal... I think the only way to do that is to separately time the BREAK?2011-05-17 04:24 AM
Tanks for the tip.
I did a EXT interupt that checks if the line is low for more than a fame, to be able to separate a ''break char'' = one frame low, from a framing error = Missing stop bit, or that the line is low for longer period than one frame.