NXP Semiconductors PN7462 series User Manual page 278

Table of Contents

Advertisement

NXP Semiconductors
14.3.3.9 Data sampling
Basically, the RX sampler will detect a falling edge on HSU_RX input signal,
resynchronize it to sampling clock, then will start counting a number of sample clock
cycles before sampling each data bit. The RX data sampling is based on the ratio
between the sampling clock (27.12 MHz) and the communication baud rate: integer part
of this ratio is stored in HSU_RX_DIVIDER, and the decimal part of this ratio will be
reflected in HSU_RX_CORRECT, by distributing '1' in this register with a proportion
equivalent to the decimal part of the ratio. The RX sampler will count up to this value to
determine the bit length. The sampled time (ideally at the middle of bit length) is
determined as HSU_RX_DIVIDER/2 (this is an integer). When the ratio between the
sampling clock frequency and the baud rate is not an integer, then HSU_RX_CORRECT
provides a mean to extend individually the duration of each sampled bit of one sample
clock cycle: the proportion of '1' in this register should reflect the decimal part of the ratio
between sampling clock and baud rate. At start bit detection, the counter starts with value
3 to compensate for the start bit detection and re synchronization which consumed 2 to 3
clock cycles (not deterministic due to asynchronicity between RX and sampling clock).
Due to clock uncertainty given by start bit detection, average sample time for first bit is
HSU_RX_DIVIDER/2+0.5 clock cycles when HSU_RX_DIVIDER is even, and
HSU_RX_DIVIDER/2 clock cycles when HSU_RX_DIVIDER is odd.
duration of each sampled bit. If we only consider 1 stop bit, and we call the number of '1'
in RX_correct[9:0], we can compute the average bit duration:
(RX_divider+d/10+0.05)xsample_clock_period. This is why d should approximately
reflect the decimal part of sample_clock_frequency/baud rate.
Table 318.
Bit
Start bit
Bit 0
Bit 1
Bit 2
Bit 3
Bit 4
Bit 5
Bit 6
Bit 7
Stop Bit 0
Stop Bit 1
As a conclusion, RX_DIVIDER will be programmed to the integer part of 27.12/baud rate.
RX_CORRECT will be programmed with an evenly distributed proportion of 1 equal to
the decimal part of this ratio (for example, if ratio if 8.25, then RX_correct will have 1/4 of
'1' bits, for example: 01000100). A script is provided which can give one of the best
values for RX_correct (best sampling results for given clock accuracy of both the host
and the hostif).
UM10858
User manual
COMPANY PUBLIC
Bit duration in sample clock cycle
Duration (# of sample clock cycles)
RX_divider+0.5+RX correct[0]
RX_divider+RX_correct[1]
RX_divider+RX_correct[2]
RX_divider+RX_correct[3]
RX_divider+RX_correct[4]
RX_divider+RX_correc[5]
RX_divider+RX_correct[6]
RX_divider+RX_correct[7]
RX_divider+RX_correct[8]
RX_divider+RX_correct[9]
RX_divider+RX_correct[10]
All information provided in this document is subject to legal disclaimers.
Rev. 1.4 — 14 May 2018
314514
UM10858
PN7462 family HW user manual
Table 318
shows the
© NXP B.V. 2018. All rights reserved.
278 of 345

Advertisement

Table of Contents
loading

Table of Contents