SPDIF receiver interface (SPDIFRX) RM0390
902/1328 RM0390 Rev 4
The search of the longest and shortest transition is stopped when the transition timer
expires. The transition timer is like a watchdog timer that generates a trigger after 70
transitions of the incoming signal. Note that counting 70 transitions insures a delay a bit
longer than a sub-frame.
Note that when the TRCNT overflows due to a too long time interval between two pulses,
the SPDIFRX is stopped and the flag TERR of SPDIFRX_SR register is set to 1.
Transition coder and preamble detector
The transition coder and preamble detector block receives the MAX_CNT and
MIN_CNT. It also receives the current transition width from the TRCNT counter (see
Figure 343). This block encodes the current transition width by comparing the current
transition width with two different thresholds, names TH
HI
and TH
LO
.
• If the current transition width is less than (TH
LO
- 1), then the data received is half part
of data bit ‘1’, and is coded as TS.
• If the current transition width is greater than (TH
LO
- 1), and less than TH
HI
, then the
data received is data bit ‘0’, and is coded as TM.
• If the current transition width is greater than TH
HI
, then the data received is the long
pulse of preambles, and is coded as TL.
• Else an error code is generated (FERR flag is set).
The thresholds TH
HI
and TH
LO
are elaborated using two different methods.
If the peripheral is doing its initial synchronization (‘coarse synchronization’), then the
thresholds are computed as follow:
• TH
LO
= MAX_CNT / 2.
• TH
HI
= MIN_CNT + MAX_CNT / 2.
Once the ‘coarse synchronization’ is completed, then the SPDIFRX uses a more accurate
reference in order to elaborate the thresholds. The SPDIFRX measures the length of 24
symbols (WIDTH24) for defining TH
LO
and the length of 40 symbols (WIDTH40) for TH
HI
.
TH
HI
and TH
LO
are computed as follow:
• TH
LO
= (WIDTH24) / 32
• TH
HI
= (WIDTH40) / 32
This second synchronization phase is called the ‘fine synchronization’. Refer to Figure 347
for additional information.
As shown in the figure hereafter, TH
LO
is ideally equal to 1.5 UI, and to TH
HI
2.5 UI.