64. HDMI-CEC controller (CEC)

64.1 HDMI-CEC introduction

Consumer electronics control (CEC) is part of HDMI (high-definition multimedia interface) standard. It contains a protocol that provides high-level control functions between various audiovisual products. CEC operates at low speeds, with minimum processing and memory overhead.

The HDMI-CEC controller provides hardware support for this protocol.

64.2 HDMI-CEC controller main features

64.3 HDMI-CEC functional description

64.3.1 HDMI-CEC pin and internal signals

The CEC bus consists of a single bidirectional line that is used to transfer data in and out of the device. It is connected to a +3.3 V supply voltage via a 27 kΩ pull-up resistor. The output stage of the device must have an open-drain or open-collector to allow a wired-AND connection.

The HDMI-CEC controller manages the CEC bidirectional line as an alternate function of a standard GPIO, assuming that it is configured as alternate function open drain. The 27 kΩ pull-up must be added externally to the microcontroller.

To not interfere with the CEC bus when the application power is removed, it is mandatory to isolate the CEC pin from the bus in such conditions. This can be done by using a MOS transistor, as shown on Figure 811.

Table 560 lists the internal signals that are exchanged between the HDMI-CEC and other functional blocks (such as RCC and EXTI).

Table 559. HDMI pin

NameSignal typeRemarks
CECBidirectionalTwo states:
– 1 = high impedance
– 0 = low impedance
A 27 kΩ resistor must be added externally.

Table 560. HDMI-CEC internal input/output signals

Signal nameSignal typeDescription
cec_wkupDigital outputHDMI-CEC wake-up signal
cec_itDigital outputHDMI-CEC interrupt signal
cec_pclkDigital inputAPB clock
cec_ker_ckDigital inputHDMI-CEC kernel clock

64.3.2 HDMI-CEC block diagram

Figure 811. HDMI-CEC block diagram

Block diagram of the STM32 HDMI_CEC controller. The diagram shows the internal components of the controller and its connection to the CEC line and a remote device. Inside the 'STM32 HDMI_CEC controller' block, there is a 'CEC ITF' (Interface) block connected to a '32 kHz CEC kernel' block. The CEC ITF is connected to the '32-bit APB bus' and receives 'cec_it' and 'cec_pclk' signals. The 32 kHz CEC kernel has 'CLK', 'RX', and 'TX' pins, and receives 'cec_ker_ck' and 'cec_wkup' signals. It also has a 'Wake-int' output. The kernel's RX and TX pins are connected to a bidirectional buffer. The buffer's output is connected to the 'CEC PAD', which is then connected to the 'CEC line'. The CEC line is connected to a 'Remote CEC device' through a Schottky diode. The CEC line also has a 27 kΩ pull-up resistor to 3.3V. The diode's gate (G) is connected to 3.3V.
Block diagram of the STM32 HDMI_CEC controller. The diagram shows the internal components of the controller and its connection to the CEC line and a remote device. Inside the 'STM32 HDMI_CEC controller' block, there is a 'CEC ITF' (Interface) block connected to a '32 kHz CEC kernel' block. The CEC ITF is connected to the '32-bit APB bus' and receives 'cec_it' and 'cec_pclk' signals. The 32 kHz CEC kernel has 'CLK', 'RX', and 'TX' pins, and receives 'cec_ker_ck' and 'cec_wkup' signals. It also has a 'Wake-int' output. The kernel's RX and TX pins are connected to a bidirectional buffer. The buffer's output is connected to the 'CEC PAD', which is then connected to the 'CEC line'. The CEC line is connected to a 'Remote CEC device' through a Schottky diode. The CEC line also has a 27 kΩ pull-up resistor to 3.3V. The diode's gate (G) is connected to 3.3V.

MSv41965V2

64.3.3 Message description

All transactions on the CEC line consist of an initiator and one or more followers. The initiator is responsible for sending the message structure and the data. The follower is the recipient of any data and is responsible for setting any acknowledgment bits.

A message is conveyed in a single frame that consists of a start bit followed by a header block and optionally an opcode and a variable number of operand blocks.

All these blocks are made of a 8-bit payload - most significant bit is transmitted first - followed by an end of message (EOM) bit and an acknowledge (ACK) bit.

The EOM bit is set in the last block of a message and kept reset in all others. In case a message contains additional blocks after an EOM is indicated, those additional blocks must be ignored. The EOM bit may be set in the header block to 'ping' other devices, to make sure they are active.

The acknowledge bit is always set to high impedance by the initiator so that it can be driven low either by the follower that has read its own address in the header, or by the follower that needs to reject a broadcast message.

The header consists of the source logical address field, and the destination logical address field. Note that the special address 0xF is used for broadcast messages.

Figure 812. Message structure

Diagram of the CEC message structure. The message is shown as a sequence of blocks: 'high impedance', 'START BIT', 'HEADER', 'OPCODE', 'OPERAND', and 'OPERAND'. A bracket above the 'OPERAND' blocks indicates '0 to 14 operands'. The message ends with 'high impedance'. The 'START BIT' and 'HEADER' blocks are shown as single boxes, while 'OPCODE' and 'OPERAND' are shown as wider boxes. Dashed lines indicate that there can be multiple 'OPERAND' blocks.
Diagram of the CEC message structure. The message is shown as a sequence of blocks: 'high impedance', 'START BIT', 'HEADER', 'OPCODE', 'OPERAND', and 'OPERAND'. A bracket above the 'OPERAND' blocks indicates '0 to 14 operands'. The message ends with 'high impedance'. The 'START BIT' and 'HEADER' blocks are shown as single boxes, while 'OPCODE' and 'OPERAND' are shown as wider boxes. Dashed lines indicate that there can be multiple 'OPERAND' blocks.

MS31004V1

Figure 813. Blocks

Diagram of CEC message blocks. The HEADER BLOCK contains INITIATOR[3:0], DESTINATION[3:0], EOM, and ACK. The OPCODE/OPERAND BLOCK contains DATA[7:0], EOM, and ACK. Both blocks have a 0 bit at the end.

HEADER BLOCK

INITIATOR[3:0]DESTINATION[3:0]EOMACK0

OPCODE/OPERAND BLOCK

DATA[7:0]EOMACK0

MS31005V1

Diagram of CEC message blocks. The HEADER BLOCK contains INITIATOR[3:0], DESTINATION[3:0], EOM, and ACK. The OPCODE/OPERAND BLOCK contains DATA[7:0], EOM, and ACK. Both blocks have a 0 bit at the end.

64.3.4 Bit timing

The format of the start bit is unique and identifies the start of a message. It must be validated by its low duration and its total duration.

All remaining data bits in the message, after the start bit, have consistent timing. The high-to-low transition at the end of the data bit is the start of the next data bit except for the final bit where the CEC line remains high.

Figure 814. Bit timings

Timing diagrams for CEC bits. START BIT: total duration 4.5 ms +/- 0.2 ms, low duration 3.7 ms +/- 0.2 ms. DATA BIT INITIATOR LOGICAL 0: total 2.4 ms +/- 0.35 ms, low 1.5 ms +/- 0.2 ms. DATA BIT INITIATOR LOGICAL 1: total 2.4 ms +/- 0.35 ms, high 0.6 ms +/- 0.2 ms. DATA BIT FOLLOWER LOGICAL 0: total 2.4 ms +/- 0.35 ms, low 1.5 ms +/- 0.2 ms, high 0.35 ms max.

START BIT

high impedance

low impedance

4.5 ms +/- 0.2 ms

3.7 ms +/- 0.2 ms

DATA BIT INITIATOR LOGICAL 0

high impedance

low impedance

2.4 ms +/- 0.35 ms

1.5 ms +/- 0.2 ms

DATA BIT INITIATOR LOGICAL 1

high impedance

low impedance

2.4 ms +/- 0.35 ms

0.6 ms +/- 0.2 ms

DATA BIT FOLLOWER LOGICAL 0

high impedance

low impedance

2.4 ms +/- 0.35 ms

1.5 ms +/- 0.2 ms

0.35 ms max

MS31006V1

Timing diagrams for CEC bits. START BIT: total duration 4.5 ms +/- 0.2 ms, low duration 3.7 ms +/- 0.2 ms. DATA BIT INITIATOR LOGICAL 0: total 2.4 ms +/- 0.35 ms, low 1.5 ms +/- 0.2 ms. DATA BIT INITIATOR LOGICAL 1: total 2.4 ms +/- 0.35 ms, high 0.6 ms +/- 0.2 ms. DATA BIT FOLLOWER LOGICAL 0: total 2.4 ms +/- 0.35 ms, low 1.5 ms +/- 0.2 ms, high 0.35 ms max.

64.4 Arbitration

All devices transmitting - or retransmitting - a message onto the CEC line must ensure that it has been inactive for a number of bit periods. This signal-free time is defined as the time

starting from the final bit of the previous frame and depends on the initiating device and the current status as shown in the figure below.

Figure 815. Signal free time

Timing diagram for Signal free time showing the interval between the end of a PREVIOUS MESSAGE and the start of a NEW MESSAGE.

The diagram shows a horizontal timeline. A box labeled 'PREVIOUS MESSAGE' is followed by a gap labeled 'Signal free time' with a double-headed arrow, which is then followed by a box labeled 'NEW MESSAGE'. The reference code 'MS31007V1' is in the bottom right corner.

Timing diagram for Signal free time showing the interval between the end of a PREVIOUS MESSAGE and the start of a NEW MESSAGE.

Since only one initiator is allowed at any one time, an arbitration mechanism is provided to avoid conflict when more than one initiator begins transmitting at the same time.

CEC line arbitration starts with the leading edge of the start bit and continues until the end of the initiator address bits within the header block. During this period, the initiator must monitor the CEC line, if whilst driving the line to high impedance it reads it back to 0. Assuming then it has lost arbitration, it stops transmitting and becomes a follower.

Figure 816. Arbitration phase

Timing diagram for Arbitration phase showing the sequence: high impedance, START BIT, INITIATOR[3:0], DESTINATION[3:0], EOM, and ACK.

The diagram shows a horizontal timeline. It starts with 'high impedance', followed by a box 'START BIT', then a box 'INITIATOR[3:0]', then a box 'DESTINATION[3:0]', then a box 'EOM', and finally a box 'ACK'. A double-headed arrow labeled 'Arbitration phase' spans from the start of the 'START BIT' to the end of the 'INITIATOR[3:0]' box. The reference code 'MS31008V1' is in the bottom right corner.

Timing diagram for Arbitration phase showing the sequence: high impedance, START BIT, INITIATOR[3:0], DESTINATION[3:0], EOM, and ACK.

Figure 817 shows an example for a SFT of three nominal bit periods.

Figure 817. SFT of three nominal bit periods

Timing diagram for SFT of three nominal bit periods showing the signal level transitions and the time intervals between the last bit of the previous frame and the start bit.

The diagram shows a digital signal waveform. It starts high, transitions to low, then back to high. Three vertical dashed lines mark specific points in time. The first dashed line is at the end of the low pulse, labeled 'last bit of previous frame'. The second dashed line is at the end of the high pulse. The third dashed line is at the end of the next low pulse, labeled 'Start bit'. Double-headed arrows indicate the time intervals between these dashed lines. The reference code 'MS31009V1' is in the bottom right corner.

Timing diagram for SFT of three nominal bit periods showing the signal level transitions and the time intervals between the last bit of the previous frame and the start bit.

A configurable time window is counted before starting the transmission.

In the SFT = 0 configuration, HDMI-CEC performs automatic SFT calculation ensuring compliance with the HDMI-CEC standard:

This is done to guarantee the maximum priority to a failed transmission and the lowest one to the last initiator that completed successfully its transmission.

Otherwise there is the possibility to configure the SFT bits to count a fixed timing value. Possible values are 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5 data bit periods.

64.4.1 SFT option bit

In case of SFTOPT = 0 configuration, SFT starts being counted when the start-of-transmission command is set by software (TXSOM = 1).

In case of SFTOPT = 1, SFT starts automatically being counted by the HDMI-CEC device when a bus-idle or line error condition is detected. If the SFT timer is completed at the time TXSOM command is set then transmission starts immediately without latency. If the SFT timer is still running instead, the system waits until the timer elapses before transmission can start.

In case of SFTOPT = 1 a bus-event condition starting the SFT timer is detected in the following cases:

64.5 Error handling

64.5.1 Bit error

If a data bit - excluding the start bit - is considered invalid, the follower is expected to notify such error by generating a low bit period on the CEC line of 1.4 to 1.6 times the nominal data bit period (3.6 ms nominally).

Figure 818. Error bit timing

Timing diagram for an error bit. The diagram shows a signal line that transitions from high impedance to low impedance for a duration of 3.6 ms +/- 0.24 ms, and then returns to high impedance. The low impedance state is labeled 'ERROR BIT'.

The diagram illustrates the timing of an error bit. It shows a signal line that transitions from a high impedance state to a low impedance state. The duration of the low impedance state is specified as 3.6 ms +/- 0.24 ms. The low impedance state is labeled 'ERROR BIT'. The signal then returns to the high impedance state.

MS31010V1

Timing diagram for an error bit. The diagram shows a signal line that transitions from high impedance to low impedance for a duration of 3.6 ms +/- 0.24 ms, and then returns to high impedance. The low impedance state is labeled 'ERROR BIT'.

64.5.2 Message error

A message is considered lost and therefore may be retransmitted under the following conditions:

Three kinds of error flag can be detected when the CEC interface is receiving a data bit:

64.5.3 Bit rising error (BRE)

BRE (bit rising error) is set when a bit rising edge is detected outside the windows where it is expected (see Figure 819). BRE flag also generates a CEC interrupt if the BREIE = 1.

In the case of a BRE detection, the message reception can be stopped according to the BRESTP bit value and an error bit can be generated if BREGEN bit is set.

When BRE is detected in a broadcast message with BRESTP = 1 an error bit is generated even if BREGEN = 0 to enforce initiator's retry of the failed transmission. Error bit generation can be disabled by configuring BREGEN = 0, BRDNOGEN = 1.

64.5.4 Short bit period error (SBPE)

SBPE is set when a bit falling edge is detected earlier than expected (see Figure 819). SBPE flag also generates a CEC interrupt if the SBPEIE = 1.

An error bit is always generated on the line in case of a SBPE error detection. An error bit is not generated upon SBPE detection only when Listen mode is set (LSTN = 1) and the following conditions are met:

64.5.5 Long bit period error (LBPE)

LBPE is set when a bit falling edge is not detected in a valid window (see Figure 819). LBPE flag also generates a CEC interrupt if the LBPEIE = 1.

LBPE always stops the reception, an error bit is generated on the line when LBPEGEN bit is set.

When LBPE is detected in a broadcast message an error bit is generated even if LBPEGEN = 0 to enforce initiator's retry of the failed transmission. Error bit generation can be disabled by configuring LBPEGEN = 0, BRDNOGEN = 1.

Note: The BREGEN = 1, BRESTP = 0 configuration must be avoided.

Figure 819. Error handling

Timing diagram for error handling showing BRE Checking Window, CEC initiator bit-timing, and Tolerance margins. The diagram illustrates two data bits. The first bit starts at Ts, with a low-to-high transition at T1 and a high-to-low transition at Tn1. The BRE Checking Window spans from T1 to T2. The nominal sampling time Tns is at the center. The second bit starts at T3, with a low-to-high transition at Tn0 and a high-to-low transition at Tnf. The SBPE window spans from T1 to T5. The LBPE window is after Tnf. Tolerance margins are shown as dashed lines around the transitions.

Legend:

Timing parameters: \(T_s\), T₁, \(T_{n1}\), T₂, \(T_{ns}\), T₃, \(T_{n0}\), T₄, T₅, \(T_{nf}\), T₆

MS31011V1

Timing diagram for error handling showing BRE Checking Window, CEC initiator bit-timing, and Tolerance margins. The diagram illustrates two data bits. The first bit starts at Ts, with a low-to-high transition at T1 and a high-to-low transition at Tn1. The BRE Checking Window spans from T1 to T2. The nominal sampling time Tns is at the center. The second bit starts at T3, with a low-to-high transition at Tn0 and a high-to-low transition at Tnf. The SBPE window spans from T1 to T5. The LBPE window is after Tnf. Tolerance margins are shown as dashed lines around the transitions.

Table 561. Error handling timing parameters

TimeRXTOLmsDescription
\(T_s\)x0Bit start event.
T₁10.3The earliest time for a low - high transition when indicating a logical 1.
00.4
\(T_{n1}\)x0.6The nominal time for a low - high transition when indicating a logical 1.
T₂00.8The latest time for a low - high transition when indicating a logical 1.
10.9
\(T_{ns}\)x1.05Nominal sampling time.
T₃11.2The earliest time a device is permitted return to a high impedance state (logical 0).
01.3
\(T_{n0}\)x1.5The nominal time a device is permitted return to a high impedance state (logical 0).
T₄01.7The latest time a device is permitted return to a high impedance state (logical 0).
11.8
T₅11.85The earliest time for the start of a following bit.
02.05
\(T_{nf}\)x2.4The nominal data bit period.
T₆02.75The latest time for the start of a following bit.
12.95

64.5.6 Transmission error detection (TXERR)

The CEC initiator sets the TXERR flag if detecting low impedance on the CEC line when it is transmitting high impedance and is not expecting a follower asserted bit. TXERR flag also generates a CEC interrupt if the TXERRIE = 1.

TXERR assertion stops the message transmission. Application is in charge to retry the failed transmission up to five times.

TXERR checks are performed differently depending on the different states of the CEC line and on the RX tolerance configuration.

Figure 820. TXERR detection

Timing diagram for TXERR detection showing Tx data bit-1, Tx arbitration bit-1, Tx acknowledge, and Tx arbitration bit-0. It includes a legend for TXERR Checking Window, CEC initiator bit-timing, and Tolerance margins. Time points Ts, T1, Tn1, T2, Tns, T3, Tn0, T4, T5, Tnf, T6 are marked.

The diagram illustrates the timing for TXERR detection. It shows two signal lines: 'Tx data bit-1' and 'Tx arbitration bit-0'. A legend at the top defines three elements: 'TXERR Checking Window' (indicated by a horizontal double-headed arrow), 'CEC initiator bit-timing' (indicated by a square wave), and 'Tolerance margins' (indicated by dashed lines around the signal transitions). The diagram shows the following sequence of events:

The 'Tx acknowledge' signal is shown as a high state starting at Ts and ending at Tnf. The 'Tx arbitration bit-1' signal is shown as a high state starting at Ts and ending at Tnf. The 'Tx data bit-1' signal is shown as a low state starting at Ts and ending at Tnf. The 'Tx arbitration bit-0' signal is shown as a low state starting at Ts and ending at Tnf. The 'Tx data bit-0' signal is shown as a low state starting at Ts and ending at Tnf.

Timing diagram for TXERR detection showing Tx data bit-1, Tx arbitration bit-1, Tx acknowledge, and Tx arbitration bit-0. It includes a legend for TXERR Checking Window, CEC initiator bit-timing, and Tolerance margins. Time points Ts, T1, Tn1, T2, Tns, T3, Tn0, T4, T5, Tnf, T6 are marked.

MS31012V1

Table 562. TXERR timing parameters

TimeRXTOLmsDescription
Tsx0Bit start event.
T110.3The earliest time for a low - high transition when indicating a logical 1.
00.4
Tn1x0.6The nominal time for a low - high transition when indicating a logical 1.
T200.8The latest time for a low - high transition when indicating a logical 1.
10.9
Tnsx1.05Nominal sampling time.
T311.2The earliest time a device is permitted return to a high impedance state (logical 0).
01.3

Table 562. TXERR timing parameters (continued)

TimeRXTOLmsDescription
Tn0x1.5The nominal time a device is permitted return to a high impedance state (logical 0).
T401.7The latest time a device is permitted return to a high impedance state (logical 0).
11.8
T511.85The earliest time for the start of a following bit.
02.05
Tnfx2.4The nominal data bit period.
T602.75The latest time for the start of a following bit.
12.95

64.6 HDMI-CEC interrupts

An interrupt can be produced:

Table 563. HDMI-CEC interrupts

Interrupt eventEvent flagEnable control bit
Rx-byte receivedRXBRRXBRIE
End of receptionRXENDRXENDIE
Rx-overrunRXOVRRXOVRIE
Rxbit rising errorBREBREIE
Rx-short bit period errorSBPESBPEIE
Rx-long bit period errorLBPELBPEIE
Rx-missing acknowledge errorRXACKERXACKEIE
Arbitration lostARBLSTARBLSTIE
Tx-byte requestTXBRTXBRIE
End of transmissionTXENDTXENDIE
Tx-buffer underrunTXUDRTXUDRIE
Tx-errorTXERRTXERRIE
Tx-missing acknowledge errorTXACKETXACKEIE

64.7 HDMI-CEC registers

Refer to Section 1.2 for a list of abbreviations used in register descriptions. The registers have to be accessed by words (32 bits).

64.7.1 CEC control register (CEC_CR)

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TXEO
M
TXSO
M
CECEN
rsrsrw

Bits 31:3 Reserved, must be kept at reset value.

Bit 2 TXEOM: Tx end of message

The TXEOM bit is set by software to command transmission of the last byte of a CEC message. TXEOM is cleared by hardware at the same time and under the same conditions as for TXSOM.
0: TXDR data byte is transmitted with EOM = 0.
1: TXDR data byte is transmitted with EOM = 1.

Note: TXEOM must be set when CECEN = 1.
TXEOM must be set before writing transmission data to TXDR.
If TXEOM is set when TXSOM = 0, transmitted message consists of 1 byte (HEADER) only (PING message).

Bit 1 TXSOM: Tx start of message

TXSOM is set by software to command transmission of the first byte of a CEC message. If the CEC message consists of only one byte, TXEOM must be set before of TXSOM.
Start-bit is effectively started on the CEC line after SFT is counted. If TXSOM is set while a message reception is ongoing, transmission starts after the end of reception.
TXSOM is cleared by hardware after the last byte of the message is sent with a positive acknowledge (TXEND = 1), in case of transmission underrun (TXUDR = 1), negative acknowledge (TXACKE = 1), and transmission error (TXERR = 1). It is also cleared by CECEN = 0. It is not cleared and transmission is automatically retried in case of arbitration lost (ARBLST = 1).
TXSOM can be also used as a status bit informing application whether any transmission request is pending or under execution. The application can abort a transmission request at any time by clearing the CECEN bit.
0: No CEC transmission is on-going.
1: CEC transmission command

Note: TXSOM must be set when CECEN = 1.
TXSOM must be set when transmission data is available into TXDR.
HEADER first four bits containing own peripheral address are taken from TXDR[7:4], not from CEC_CFGR.OAR that is used only for reception.

ST logo
ST logo

Bit 0 CECEN: CEC enable

The CECEN bit is set and cleared by software. CECEN = 1 starts message reception and enables the TXSOM control. CECEN = 0 disables the CEC peripheral, clears all bits of CEC_CR register and aborts any on-going reception or transmission.

0: CEC peripheral is off.

1: CEC peripheral is on.

64.7.2 CEC configuration register (CEC_CFGR)

This register is used to configure the HDMI-CEC controller.

Address offset: 0x04

Reset value: 0x0000 0000

Caution: It is mandatory to write CEC_CFGR only when CECEN = 0.

31302928272625242322212019181716
LSTNOAR[14:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.SFTOPBRDN
OGEN
LBPEG
EN
BREGE
N
BREST
P
RXTOLSFT[2:0]
rwrwrwrwrwrwrwrwrw

Bit 31 LSTN: Listen mode

LSTN bit is set and cleared by software.

0: CEC peripheral receives only message addressed to its own address (OAR). Messages addressed to different destination are ignored. Broadcast messages are always received.

1: CEC peripheral receives messages addressed to its own address (OAR) with positive acknowledge. Messages addressed to different destination are received, but without interfering with the CEC bus: no acknowledge sent.

Bits 30:16 OAR[14:0]: Own addresses configuration

The OAR bits are set by software to select which destination logical addresses has to be considered in receive mode. Each bit, when set, enables the CEC logical address identified by the given bit position.

At the end of HEADER reception, the received destination address is compared with the enabled addresses. In case of matching address, the incoming message is acknowledged and received. In case of non-matching address, the incoming message is received only in listen mode (LSTN = 1), but without acknowledge sent. Broadcast messages are always received.

Example:

OAR = 0b000 0000 0010 0001 means that CEC acknowledges addresses 0x0 and 0x5.

Consequently, each message directed to one of these addresses is received.

Bits 15:9 Reserved, must be kept at reset value.

Bit 8 SFTOP: SFT option bit

The SFTOPT bit is set and cleared by software.

0: SFT timer starts when TXSOM is set by software.

1: SFT timer starts automatically at the end of message transmission/reception.

64.7.3 CEC Tx data register (CEC_TXDR)

Address offset: 0x8

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.TXD[7:0]
wwwwwwww

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 TXD[7:0]: Tx data

TXD is a write-only register containing the data byte to be transmitted.

64.7.4 CEC Rx data register (CEC_RXDR)

Address offset: 0xC

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.RXD[7:0]
rrrrrrrr

Bits 31:8 Reserved, must be kept at reset value.

Bits 7:0 RXD[7:0]: Rx data

RXD is read-only and contains the last data byte that has been received from the CEC line.

64.7.5 CEC interrupt and status register (CEC_ISR)

Address offset: 0x10

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.TXACK
E
TXERRTXUDRTXENDTXBRARBLSTRXACK
E
LBPESBPEBRERXOV
R
RXENDRXBR
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

Bits 31:13 Reserved, must be kept at reset value.

Bit 3 BRE: Rx-bit rising error

BRE is set by hardware in case a data-bit waveform is detected with bit rising error. BRE is set either at the time the misplaced rising edge occurs, or at the end of the maximum BRE tolerance allowed by RXTOL, in case rising edge is still longing. BRE stops message reception if BRESTP = 1. BRE generates an error-bit on the CEC line if BREGEN = 1.
BRE is cleared by software write at 1.

Bit 2 RXOVR: Rx-overrun

RXOVR is set by hardware if RXBR is not yet cleared at the time a new byte is received on the CEC line and stored into RXD. RXOVR assertion stops message reception so that no acknowledge is sent. In case of broadcast, a negative acknowledge is sent.
RXOVR is cleared by software write at 1.

Bit 1 RXEND: End of reception

RXEND is set by hardware to inform application that the last byte of a CEC message is received from the CEC line and stored into the RXD buffer. RXEND is set at the same time of RXBR.
RXEND is cleared by software write at 1.

Bit 0 RXBR: Rx-byte received

The RXBR bit is set by hardware to inform application that a new byte has been received from the CEC line and stored into the RXD buffer.
RXBR is cleared by software write at 1.

64.7.6 CEC interrupt enable register (CEC_IER)

Address offset: 0x14

Reset value: 0x0000 0000

Caution: It is mandatory to write CEC_IER only when CECEN = 0.
31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.TXACK IETXERR IETXUDR IETXEND IETXBRI EARBLST IERXACK IELBPEIESBPEI EBREIERXOV RIERXEND IERXBRI E
rwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:13 Reserved, must be kept at reset value.

Bit 12 TXACKIE: Tx-missing acknowledge error interrupt enable

The TXACKIE bit is set and cleared by software.

0: TXACKIE interrupt disabled

1: TXACKIE interrupt enabled

Bit 11 TXERRIE: Tx-error interrupt enable

The TXERRIE bit is set and cleared by software.

0: TXERR interrupt disabled

1: TXERR interrupt enabled

Bit 10 TXUDRIE: Tx-underrun interrupt enable

The TXUDRIE bit is set and cleared by software.

0: TXUDR interrupt disabled

1: TXUDR interrupt enabled

64.7.7 HDMI-CEC register map

Table 564. HDMI-CEC register map and reset values

OffsetRegister name313029282726252423222120191817161514131211109876543210
0x00CEC_CRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
Reset value
0x04CEC_CFGRLSTNOAR[14:0]Res.Res.Res.Res.Res.Res.Res.Res.SFTOPTBRDNOGENLBPEGENBREGENBRESTPRXTOLSFT[2:0]
Reset value00000000000000000000000000
0x08CEC_TXDRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TXD[7:0]
Reset value0000000000
0x0CCEC_RXDRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.RXD[7:0]
Reset value0000000000
0x10CEC_ISRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TXACKIETXERRIETXUDRIETXENDIETXBRIETXBRARBLSTRXACKIELBPESBPEBRERXOVRRXENDRXBR
Reset value0000000000000
0x14CEC_IERRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TXACKIETXERRIETXUDRIETXENDIETXBRIETXBRARBLSTIERXACKIELBPEIESBPEIEBREIERXOVRIERXENDIERXBRIE
Reset value0000000000000
Refer to Section 2.5 for the register boundary addresses.

Hardware debug port (HDP)

RM0436