Skip to main content
oe_it
Associate III
September 21, 2009
Question

Framing error and Break char

  • September 21, 2009
  • 5 replies
  • 1267 views
Posted on September 21, 2009 at 08:25

Framing error and Break char

    This topic has been closed for replies.

    5 replies

    oe_it
    oe_itAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:24

    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??

    st3
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:24

    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?

    ericvanolden9
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:24

    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.

    st3
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:24

    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?

     

     

    oe_it
    oe_itAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:24

    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.