Datasheet

5 - INTERNAL FLASH MEMORY ST10F269
34/184
5.6.5 - Choosing the Baud Rate for the BSL
The calculation of the serial Baud rate for ASC0
from the length of the first zero Byte that is
received, allows the operation of the bootstrap
loader of the ST10F269 with a wide range of Baud
rates. However, the upper and lower limits have to
be kept, in order to insure proper data transfer.
The ST10F269 uses timer T6 to measure the
length of the initial zero Byte. The quantization
uncertainty of this measurement implies the first
deviation from the real Baud rate, the next
deviation is implied by the computation of the
S0BRL reload value from the timer contents. The
formula below shows the association:
For a correct data transfer from the host to the
ST10F269 the maximum deviation between the
internal initialized Baud rate for ASC0 and the real
Baud rate of the host should be below 2.5%. The
deviation (F
B
, in percent) between host Baud rate
and ST10F269 Baud rate can be calculated via
the formula below:
Note: Function (F
B
) does not consider the
tolerances of oscillators and other devices
supporting the serial communication.
This Baud rate deviation is a nonlinear function
depending on the CPU clock and the Baud rate of
the host. The maxima of the function (F
B
)
increase with the host Baud rate due to the
smaller Baud rate pre-scaler factors and the
implied higher quantization error (see Figure 8).
The minimum Baud rate (B
Low
in the Figure 8) is
determined by the maximum count capacity of
timer T6, when measuring the zero Byte, and it
depends on the CPU clock. Using the maximum
T6 count 2
16
in the formula the minimum Baud
rate can be calculated. The lowest standard Baud
rate in this case would be 1200 Baud. Baud rates
below B
Low
would cause T6 to overflow. In this
case ASC0 cannot be initialized properly.
The maximum Baud rate (B
High
in the Figure 8)
is the highest Baud rate where the deviation still
does not exceed the limit, so all Baud rates
between B
Low
and B
High
are below the deviation
limit. The maximum standard Baud rate that fulfills
this requirement is 19200 Baud.
Higher Baud rates, however, may be used as
long as the actual deviation does not exceed the
limit. A certain Baud rate (marked ’I’ in Figure 8)
may violate the deviation limit, while an even
higher Baud rate (marked ’II’ in Figure 8) stays
very well below it. This depends on the host
interface.
f
CPU
32 S0BRL 1()×
B
ST10F269
=
S0BRL
T6 36
72
--------------------
T6
9
4
f
CPU
B
Host
×
,
F
B
B
Contr
B
Host
B
Contr
100× %
,
F
B
2.5
%
Figure 8 : Baud Rate Deviation Between Host and ST10F269
B
Low
2.5%
F
B
B
High
I
II
B
HOST