Discovery kit for stm32f0 series microcontrollers with stm32f072rb (27 pages)
Summary of Contents for ST STM32F100 Series
Page 1
CEC devices. This application note describes the CEC protocol software and hardware implementation based on the HDMI-CEC controller. A real application example is also provided to illustrate the software implementation. October 2010 Doc ID 16896 Rev 2 1/36 www.st.com...
Page 3
AN3127 Contents 4.6.1 Receive information subscreen ....... 31 4.6.2 Send information subscreen ....... . . 32 Conclusion .
Page 4
List of tables AN3127 List of tables Table 1. Logical addresses ............13 Table 2.
Page 5
AN3127 List of figures List of figures Figure 1. CEC frame format ............7 Figure 2.
Page 6
AN3127 Glossary of terms Broadcast message: a message sent to logical address 15 that all devices are expected to receive. Destination: the target device for a CEC message. Follower: a device that has just received a CEC message and is required to respond to it. Initiator: the device that is sending, or has just sent, a CEC message and, if appropriate, is waiting for a follower to respond.
AN3127 High-definition multimedia interface, consumer electronics control (HDMI-CEC) High-definition multimedia interface, consumer electronics control (HDMI-CEC) Introduction Consumer electronics control (CEC) is the appendix supplement 1 to the HDMI (high- definition multimedia interface) standard. It is a protocol that provides high-level control functions between all of the various audiovisual products in a given environment.
High-definition multimedia interface, consumer electronics control (HDMI-CEC) AN3127 Figure 3. Blocks All these blocks are made of an 8-bit payload (most significant bit 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 cleared in all others. If a message contains additional blocks after the EOM, these blocks should be ignored.
AN3127 High-definition multimedia interface, consumer electronics control (HDMI-CEC) Figure 5 shows an example bit with both initiator and follower where the follower may assert the bit to logical 0 to acknowledge a data block. The initiator outputs a logical 1, thus allowing the follower to change the CEC state by pulling the control line low for the duration of the safe sample period.
High-definition multimedia interface, consumer electronics control (HDMI-CEC) AN3127 Figure 7. Addresses within a HDMI cluster 1.4.2 Enhanced DDC The enhanced DDC described in this section is defined in VESA “ENHANCED DISPLAY DATA CHANNEL STANDARD Version 1 (September 2, 1999)”. All sinks are required to support these enhanced DDC features.
AN3127 High-definition multimedia interface, consumer electronics control (HDMI-CEC) Segment pointer Enhanced DDC allows access to up to 32 Kbytes of data. This is accomplished using a combination of the 0xA0/0xA1 address pair and a segment pointer. For each value of the segment pointer, 256 bytes of data are available at the 0xA0/0xA1 address pair.
High-definition multimedia interface, consumer electronics control (HDMI-CEC) AN3127 (EDID_EXT_VSDB_B0-1). Thereby, except for the root device, all devices have the physical address stored in the EDID of their connected sink. The physical address of each node is determined through the physical address discovery process.
AN3127 High-definition multimedia interface, consumer electronics control (HDMI-CEC) Whenever a new physical address (other than F.F.F.F) is discovered, a CEC device should: ● allocate the logical address (see Section 1.4.7: Logical address allocation) ● report the association between its logical and physical addresses by broadcasting <Report Physical Address>...
High-definition multimedia interface, consumer electronics control (HDMI-CEC) AN3127 Reserved addresses should not be used at present and are reserved for future extensions to this specification. Where more than one possible logical address is available for the given device type (e.g. Tuner 1, Tuner 2, etc.), an address allocation procedure should be carried out by a newly connected device.
AN3127 High-definition multimedia interface, consumer electronics control (HDMI-CEC) 1.5.1 Main features ● Supports HDMI-CEC v1.3a ● Supports the whole set of features offered with CEC (devices may use all or only some of these features, depending on functionality): – One touch play - a device may be played and become the active source by pressing a single button.
Tx and Rx modes, and easy error handling. There are 6 states: Disabled, Idle, RX, TX, RX_ERROR and TX_ERROR. Please refer to the reference manual (RM0041) available from www.st.com for more details. ● Wakeup-from-Stop source, with no data loss: the CEC line can be used as a wakeup event from the Stop mode.
AN3127 High-definition multimedia interface, consumer electronics control (HDMI-CEC) Figure 9. System exits Stop mode when data reception starts As the tolerance margin on the start bit is 200 µs, the software has to reconfigure the system clock within this time frame (see Figure 9).
Hardware environment AN3127 Hardware environment To be fully compliant with the stringent HDMI 1.3a specification, specially when the CEC device is in the power-off state, a fully integrated ESD protection should be added externally to the STM32F100xx device. For that purpose, the HDMI2C1-5DIJ ensures level-shifting and serves as the signal booster for control links of HDMI 1.3 transmitters.
, the latter have to be connected to a common 5 V ±10% supply line with pull-up resistors connected to their SDA and SCL pins. The ST reference board implemented in this application note has 3.3 V-tolerant I/Os and a HDMI-compatible I²C bus dependent on a +5 V V supply.
Hardware environment AN3127 Hardware connection To run the CEC demonstration, you have to connect the HDMI connector of the Value line evaluation board (STM32F100B-EVAL or STM32F100E-EVAL) to another HDMI device (TV, recording device, etc.) using the HDMI cable (see Figure Figure 14.
AN3127 Firmware description Firmware description Package directories When unzipped, the package has the structure shown in the figure below. Figure 15. Package directory structure _htmresc folder: contains all the html page resources of the package. Libraries folder: contains all CMSIS files and the STM32F10x standard peripheral's Drivers: ●...
Firmware description AN3127 Project folder: contains preconfigured projects and the source and header files of the CEC demonstration ● src subfolder: contains the source files – main.c: file in which the system clocks and interrupts are configured – stm32f10x_it.c: file in which the CEC events (transmitter/receiver) and error (acknowledge failure, bus error, overrun, arbitration loss) interrupts are handled.
AN3127 Firmware description Figure 16. Firmware architecture ● The Value line evaluation board (STM32100B-EVAL or STM32100E-EVAL) is designed as a complete development platform for STMicroelectronics' ARM™ Cortex®-M3 core- based Value line microcontroller. ● STM32F10x_StdPeriph_Driver: STM32F10x standard peripheral library ● User application: Value line boards (STM32100B-EVAL or STM32100E-EVAL) CEC demonstration ●...
Firmware description AN3127 Table 4. High-level functions (continued) Function name Description Reports the physical address to all other devices, thus HDMI_ReportPhysicalAddress allowing any device to create a map of the network Handles the CEC command’s receive callback HDMI_CEC_CommandCallBack 26/36 Doc ID 16896 Rev 2...
AN3127 Value line evaluation board CEC demonstration Value line evaluation board CEC demonstration The demonstration delivered with this application note is intended to run on the Value line evaluation boards (STM32100B-EVAL or STM32100E-EVAL) and it shows how to configure the HDMI-CEC peripheral and how to create a CEC network providing high-level communication between different devices using CEC protocol messages.
Value line evaluation board CEC demonstration AN3127 Note: Only the addresses of connected devices are available. If a new device is connected, its logical address is added to the list of available follower addresses. Use the LEFT and RIGHT buttons to navigate between the available CEC commands. Use the SEL button to select the command to be sent (Figure 24: Select CEC command)
AN3127 Value line evaluation board CEC demonstration Device type selection To select the device type of the CEC device, do the following: ● RIGHT button: select recording as the device type ● LEFT button: select tuner as the device type ●...
Value line evaluation board CEC demonstration AN3127 Figure 19. Physical and logical addresses display Checking the connected devices Before displaying the available follower addresses, the CEC device checks the connected devices by sending a <Polling Message> to all logical addresses. If the <Polling Message> is acknowledged, then the device retains that address.
AN3127 Value line evaluation board CEC demonstration 4.6.1 Receive information subscreen The following information is displayed when a new message is received: ● Receive status ● Sender address ● Number of bytes (including the sender address) ● Message opcode ● Data (operands) Figure 21.
Value line evaluation board CEC demonstration AN3127 Figure 22. Receive information subscreen Note: The STM32F100xx Value line CEC responds only to the following commands (to other commands, it sends a feature abort): ● Standby ● Get CEC version ● Give physical address ●...
Conclusion AN3127 Conclusion This application note gives details on the HDMI-CEC controller available on the Value line evaluation boards (STM32100B-EVAL or STM32100E-EVAL) and the CEC demonstration firmware running on this evaluation board. Note: The HDMI-CEC communication can be enhanced by adding Infrared protocols so that the user commands can be generated in a more flexible way.
AN3127 Revision history Revision history Table 5. Document revision history Date Revision Changes 01-Mar-2010 Initial release. 11-Oct-2010 Updated for high-density value line devices. Doc ID 16896 Rev 2 35/36...
Page 36
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.
Need help?
Do you have a question about the STM32F100 Series and is the answer not in the manual?
Questions and answers