st20-gp6 STMicroelectronics, st20-gp6 Datasheet - Page 85

no-image

st20-gp6

Manufacturer Part Number
st20-gp6
Description
Gps Processor
Manufacturer
STMicroelectronics
Datasheet
The most significant bit of each rxfifo entry (rxfifo[x][9]) records whether or not there was a frame
error when that entry was received (i.e. one of the effective stop bit values was ’0’). ASCSta-
tus(FrameError) is set when at least one of the valid entries in the rxfifo has its MSB set.
If the mode is one where a parity bit is expected, then the next bit, rxfifo[x][8], records whether
there was a parity error when that entry was received. Note, it does not contain the parity bit that
was received. ASCStatus(ParityError) is set when at least one of the valid entries in the rxfifo has
bit 8 set.
After changing the fifoenable bit, it is important to reset the fifo to empty (by writing to the
ASCRxReset register), since the state of the fifo pointers may be garbage.
Reception is stopped by clearing the ASCControl(RxEnable) bit. A currently received frame is
completed including the generation of the receive status flags. Start bits that follow this frame will
not be recognized.
15.2 Timeout mechanism
The ASC contains an 8-bit timeout counter. This reloads from ASCTimeout whenever one or more
of the following is true
If none of these conditions hold, the counter decrements towards 0 at every baud rate tick.
ASCStatus(TimeoutNotEmpty) is’1’ exactly whenever the rxfifo is not empty and the timeout
counter is zero.
ASCStatus(TimeoutIdle) is ‘1’ exactly whenever the rxfifo is empty and the timeout counter is
zero.
The effect of this is that whenever the rxfifo has got something in it, the timeout counter will decre-
ment until something happens to the rxfifo. If nothing happens, and the timeout counter reaches
zero, the ASCStatus(TimeoutNotEmpty) flag will be set.
When the software has emptied the rxfifo, the timeout counter will reset and start decrementing. If
no more characters arrive, when the counter reaches zero the ASCStatus(TimeoutIdle) flag will
be set.
15.3 Baud rate generation
The baud rate generator provides a clock at 16 times the baud rate, called the oversampling clock.
This clock only ticks if ASCControl(Run) is set to’1’. Setting this bit to 0 will immediately freeze the
state of the ASCs transmitter and receiver. This should only be done when the ASC is idle.
• ASCRxBuffer is read
• The ASC is in the middle of receiving a character
• ASCTimeout is written to
ST20-GP6
85/123

Related parts for st20-gp6