beautypg.com

2 restarting the reload counter, Restarting the reload counter – FUJITSU F2MCTM-16LX User Manual

Page 434

background image

418

CHAPTER 20 LIN-UART

20.6.2

Restarting the Reload Counter

The reload counter is a 15-bit reload counter that functions as dedicated baud rate
generator. The transmission/reception clock is generated by the external or internal
clock. Also, the count value of the transmission reload counter can be read by the baud
rate generator register (BGR1, BGR0).

Function of Reload Counter

The reload counter has the transmission and reception reload counters and functions as dedicated baud rate

generator. It consists of a 15-bit register for the reload value and generates the transmission/reception

clocks by the external or internal clock. Also, the count value of the transmission reload counter can be

read by the baud rate generator register (BGR1, BGR0)

Count start

When the reload value is written to the baud rate generator register (BGR1, BGR0), the reload counter

starts counting.

Restart

If the REST bit of the Serial Mode Register (SMR) is set to "1", both Reload Counters are restarted at the

next clock cycle. This feature is intended to use the Transmission Reload Counter as a simple timer.

The following figure illustrates a possible usage of this feature (assume that the reload value is 100.)

Figure 20.6-3 Reload Counter Restart Example

In this example the number of MCU clock cycles (cyc) after REST is then:

cyc = v - c + 1 = 100 - 90 + 1 = 11,

where v is the reload value and c is the read counter value.

MCU

REST

Reload
Value

Read
BGR0/1

Data
Bus

90

: don’t care

Reload

Clock

Counter
Clock
Outputs

37

36

35 100 99

98

97

96

95

94

93

92

91

90

89

88

87