English
Language : 

PXS20RM Datasheet, PDF (155/1368 Pages) Freescale Semiconductor, Inc – PXS20 Microcontroller
time measurement
start
bit
0x0
Boot Assist Module (BAM)
Figure 8-7. Autobaud measurement / UART protocol
Initially the UART RX pin is configured as GPIO input and the BAM code waits polling for the first falling
edge. Upon detection of this edge, the STM starts. Subsequently, the UART RX pin is again polled, waiting
for a rising edge. Upon detection of this edge, the STM is stopped and from the measured time, the used
baud rate is computed. The error introduced due to this polling will be small, but might be visible.
Higher Baud rates may be used, but customers will be required to ensure they fall within acceptable error
ranges. This is shown in Figure 8-8 which shows the effect of quantization error on the baud rate selection.
Figure 8-8. Baud rate Deviation Between Host and PXS20
This additional, first byte is used to measure the transmission time from the falling edge until the rising
edge. Its length will be equivalent to a start bit (low), followed by eight data bits (low), followed by a stop
bit (high); therefore the low transmission time should be equivalent to 9 bit times.
From the measured time it is possible to determine the used baud rate in relation to the current system clock
selection. The following equation gives the relation between baud rate and LINFlex register configuration:
LDIV
=
------------F----c--p---u-------------
16  baudrate
LDIV is an unsigned fixed point number and its value is reflected in the related LINFlex’s registers
(LINIBRR, LINFBRR).
Freescale Semiconductor
PXS20 Microcontroller Reference Manual, Rev. 1
8-13