UM0685 - CEC (consumer electronic control) C library using the STM32F101xx, STM32F102xx and STM32F103xx microcontrollers.pdf
(
608 KB
)
Pobierz
CEC (consumer electronic control) C library using the STM32F101xx, STM32F102xx and STM32F103xx microcontrollers
UM0685
User manual
CEC (consumer electronic control) C library using the
STM32F101xx, STM32F102xx and STM32F103xx microcontrollers
Introduction
This user manual describes the CEC library using the STM32F10xxx microcontroller family.
Consumer electronic control (CEC) is a feature of the HDMI interface 1.3 standard (high
definition multimedia interface), which is used to transmit audio/video data for multimedia
consumer products such as HDTV, DVDs, satellite receivers etc.
This library contains the following functions for a basic CEC communication:
■
Send/Receive CEC Start bit
■
Send/Receive CEC ACK bit “logical 0”
■
Send/Receive CEC data bit
■
Send/Receive CEC data byte
■
Send/Receive CEC data frame
Note that the provided CEC library supports only messages addressed to a single device
and not broadcast messages (please refer to HDMI - CEC specification).
March 2009
Rev 1
1/23
www.st.com
Contents
UM0685
Contents
1
CEC library description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2
CEC communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1
CEC frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2
Hardware considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3
CEC library functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1
CEC low level functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.1
CEC_Init
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1.2
CEC_NVIC_Configuration
function . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.3
CEC_Wait100us
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.4
CEC_TimingDelay_Decrement
function . . . . . . . . . . . . . . . . . . . . . . . 9
3.2
CEC medium level functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.1
CEC_SendStartBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.2
CEC_ReceiveStartBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.3
CEC_SendAckBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.4
CEC_ReceiveAckBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.5
CEC_SendDataBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.6
CEC_ReceiveDataBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.7
CEC_SendByte
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2.8
CEC_ReceiveByte
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3
CEC high level functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.1
CEC_SendFrame
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.2
CEC_ReceiveFrame
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4
How to run the CEC demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.1
Example of hardware connections between the three
evaluation boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2
CEC demo guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3
CEC send/receive information display on the LCD . . . . . . . . . . . . . . . . . 19
4.4
Send subscreen information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.5
Receive subscreen information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2/23
UM0685
Contents
6
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3/23
List of tables
UM0685
List of tables
Table 1. STM32F10xxx CEC library functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 2.
CEC_Init
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 3.
CEC_NVIC_Configuration
function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 4.
CEC_Wait100us
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 5.
CEC_TimingDelay_Decrement
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 6.
CEC_SendStartBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 7.
CEC_ReceiveStartBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 8.
CEC_SendAckBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 9.
CEC_ReceiveAckBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 10.
CEC_SendDataBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 11.
CEC_ReceiveDataBit
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 12.
CEC_SendByte
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 13.
CEC_ReceiveByte
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 14.
CEC_SendFrame
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 15.
CEC_ReceiveFrame
function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 16. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4/23
UM0685
List of figures
List of figures
Figure 1. CEC frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 2. CEC Hardware requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 3. Receive start bit flowchart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 4. Receive data bit flowchart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 5. CEC connections between the three STM3210B-EVAL boards . . . . . . . . . . . . . . . . . . . . . 18
Figure 6. LCD screenshot after reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 7. LCD screenshot of a successful send transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 8. LCD screen shot of a failed send transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 9. LCD screenshot of a successful receive transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 10. LCD screenshot of a detected frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 11. LCD screenshot of a failed receive transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5/23
Plik z chomika:
kaczor1000
Inne pliki z tego folderu:
um0685.zip
(1691 KB)
UM0585 - STM32F10xxx DSP library.pdf
(187 KB)
um0585.zip
(1391 KB)
UM0549 - STM3210E-EVAL demonstration software.pdf
(1163 KB)
UM0721 - STM32F105xx and STM32F107xx USB on-the-go (OTG) FS library.pdf
(909 KB)
Inne foldery tego chomika:
[KURS] EdW - Mikrokontrolery z rdzeniem ARM
Dokumenty
LIB
Noty Aplikacyjne
Noty Katalogowe
Zgłoś jeśli
naruszono regulamin