Guard Time Counter. Holtek HT32F5828

Add to My manuals
637 Pages

advertisement

Guard Time Counter. Holtek HT32F5828 | Manualzz

32-Bit Arm ®

HT32F5828

Cortex ® -M0+ MCU

Compensation mode

As the value of the ETUR register is obtained by the above procedure, the calculation results of the value may not be an integer. If the calculation result is not an integer and is less than the integer n but greater than the integer (n-1), either the integer n or (n-1) should be written into the ETUR register depending upon whether the result is closer to integer n or (n-1). The integer n mentioned here is a decimal.

If the calculation result is close to the value of (n-0.5), the compensation mode should be enabled by setting the compensation enable control bit, COMP, in the ETUR register to 1 for successful data transfer. When the result is close to the value of (n-0.5) and the compensation mode is enabled, the value written into the ETUR register should be n. The ETU circuitry will then generate the time unit sequence with n clock cycles and next (n-1) clock cycles alternately and so on. This results in an average time unit of (n-0.5) clock cycles and allows a time granularity down to a half clock cycle. Note that the ETU will reload the ETUR register value and restart counting at the time when the Start bit appears in the SCI data Transfer Mode.

SCI_DIO

Start bit Parity bit

Data bits

P n n t

ETU n n

Character n n n n n n

SCI_CLK COMP=0

SCI_CLK n n-1 n n-1 n n-1 n n-1 n n-1

SCI_CLK n-1 n n-1 n n-1 n n-1 n n-1

Note: The ETUR register value = n, i.e. 1 t

ETU

= n clocks in this example.

n

Figure 75. Character Frame and Compensation Mode

COMP=1

(Average time unit= n-0.5)

Guard Time Counter

The Guard Time Counter, GT, is a 9-bit up-counting counter which generates a minimum time duration known as a character frame, denoted as t

GT

, between the leading edges of two consecutive characters in the SCI data transfer. The clock source of the guard time counter comes from the

ETU , named f

ETU

in the block diagram. There is a register related to the guard time counter known as the GTR register, which stores the expected value of the guard time counter. The guard time value will be reloaded at the end of the current guard time period. Note that the guard time between the last character received from the Smart Card and the next character transmitted by the SCI circuitry which should be properly managed by the application program. There is no guard time insertion when the first character is transmitted.

Rev. 1.00 320 of 637 December 28, 2020

advertisement

Related manuals

advertisement

Table of contents