stm32 /stm32h7rs /STM32H7R /SPDIFRX /SPDIFRX_SR

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Interpret as SPDIFRX_SR

31 2827 2423 2019 1615 1211 87 43 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (B_0x0)RXNE 0 (B_0x0)CSRNE 0 (B_0x0)PERR 0 (B_0x0)OVR 0 (B_0x0)SBD 0 (B_0x0)SYNCD 0 (B_0x0)FERR 0 (B_0x0)SERR 0 (B_0x0)TERR 0WIDTH5

FERR=B_0x0, SBD=B_0x0, OVR=B_0x0, SERR=B_0x0, TERR=B_0x0, PERR=B_0x0, CSRNE=B_0x0, RXNE=B_0x0, SYNCD=B_0x0

Description

SPDIFRX status register

Fields

RXNE

Read data register not empty This bit is set by hardware when a valid data is available into SPDIFRX_FMTx_DR register. This flag is cleared by reading the SPDIFRX_FMTx_DR register. An interrupt is generated if RXNEIE=1 in the SPDIFRX_IMR register.

0 (B_0x0): Data is not received.

1 (B_0x1): Received data is ready to be read.

CSRNE

Control buffer register not empty This bit is set by hardware when a valid control information is ready. This flag is cleared when reading SPDIFRX_CSR register. An interrupt is generated if CBRDYIE = 1 in the SPDIFRX_IMR register.

0 (B_0x0): No control word available on SPDIFRX_CSR register

1 (B_0x1): A control word is available on SPDIFRX_CSR register.

PERR

Parity error This bit is set by hardware when the data and status bits of the sub-frame received contain an odd number of 0 and 1. This flag is cleared by writing a 1 to its corresponding bit on SPDIFRX_IFCR register. An interrupt is generated if PIE = 1 in the SPDIFRX_IMR register.

0 (B_0x0): No parity error

1 (B_0x1): Parity error

OVR

Overrun error This bit is set by hardware when a received data is ready to be transferred in the SPDIFRX_FMTx_DR register while RXNE = 1 and both SPDIFRX_FMTx_DR and RX_BUF are full. This flag is cleared by writing a 1 to its corresponding bit on SPDIFRX_IFCR register. An interrupt is generated if OVRIE=1 in the SPDIFRX_IMR register. Note: When this bit is set, the SPDIFRX_FMTx_DR register content is not lost but the last data received are.

0 (B_0x0): No overrun error

1 (B_0x1): Overrun error is detected.

SBD

Synchronization block detected This bit is set by hardware when a B preamble is detected. This flag is cleared by writing a 1 to its corresponding bit on SPDIFRX_IFCR register. An interrupt is generated if SBLKIE = 1 in the SPDIFRX_IMR register.

0 (B_0x0): No B preamble is detected.

1 (B_0x1): B preamble is detected.

SYNCD

Synchronization done This bit is set by hardware when the initial synchronization phase is properly completed. This flag is cleared by writing a 1 to its corresponding bit on SPDIFRX_IFCR register. An interrupt is generated if SYNCDIE = 1 in the SPDIFRX_IMR register.

0 (B_0x0): Synchronization is pending.

1 (B_0x1): Synchronization is completed.

FERR

Framing error This bit is set by hardware when an error occurs during data reception: such as preamble not at the expected place, short transition not grouped by pairs. This is set by the hardware only if the synchronization is completed (SYNCD = 1). This flag is cleared by writing SPDIFRXEN to 0. An interrupt is generated if IFEIE=1 in the SPDIFRX_IMR register.

0 (B_0x0): No Manchester violation detected

1 (B_0x1): Manchester violation detected

SERR

Synchronization error This bit is set by hardware when the synchronization fails due to amount of re-tries for NBTR. This flag is cleared by writing SPDIFRXEN to 0. An interrupt is generated if IFEIE = 1 in the SPDIFRX_IMR register.

0 (B_0x0): No synchronization error is detected.

1 (B_0x1): Synchronization error is detected.

TERR

Time-out error This bit is set by hardware when the counter TRCNT reaches its max value. It indicates that the time interval between two transitions is too long. It generally indicates that there is no valid signal on SPDIFRX_IN input. This flag is cleared by writing SPDIFRXEN to 0. An interrupt is generated if IFEIE=1 in the SPDIFRX_IMR register.

0 (B_0x0): No sequence error is detected.

1 (B_0x1): Sequence error is detected.

WIDTH5

duration of 5 symbols counted with spdifrx_ker_ck This value represents the amount of spdifrx_ker_ck clock periods contained on a length of 5 consecutive symbols. This value can be used to estimate the S/PDIF symbol rate. Its accuracy is limited by the frequency of spdifrx_ker_ck. For example if the spdifrx_ker_ck is fixed to 84 MHz, and WIDTH5 = 147d. The estimated sampling rate of the S/PDIF stream is: Fs = 5 x Fspdifrx_ker_ck / (WIDTH5 x 64) ~ 44.6 kHz, so the closest standard sampling rate is 44.1 kHz. Note that WIDTH5 is updated by the hardware when SYNCD goes high, and then every frame.

Links

()