ST STM32F100 Series Application Note Download Page 25

AN3127

Firmware description

Doc ID 16896 Rev 2

25/36

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

Display module

: It can be an LCD or Terminal programs. It is used to display the CEC 

demonstration messages.

CEC driver 

(

stm32100b_eval_cec

 or 

stm32100e_eval_cec

): the application may 

interface CEC devices directly through the driver application layer. The driver functions 
are summarized in 

Table 4: High-level functions

.

High-level functions

These are the functions that can simply be called by the final application to execute all 
needed configurations and perform high-end functionalities (like sending and receiving 
messages).

         

Table 4.

High-level functions

Function name

Description

HDMI_CEC_Init

Initializes the HDMI-CEC controller:

Enables the CEC and GPIOx clocks

Configures the CEC line

Calls the 

PhysicalAddressDiscovery

 function

Calls the 

LogicalAddressAllocation

 function

Calls the 

HDMI_ReportPhysicalAddress

 function

HDMI_CEC_TransmitMessage

Transmits messages (Header, opcode and operands)

HDMI_CEC_GetErrorStatus

Gets the error status register (ESR) register status

HDMI_CEC_ProcessIRQSrc

Processes all the interrupts (RBTF, RERR, TBTRF, TERR) 
that are high

PhysicalAddressDiscovery

Algorithm used to discover the physical address

LogicalAddressAllocation

Allocates the device’s logical address based on the logical 
address allocation algorithm

5SERAPPLICATION

!PPLICATION
LEVEL

&IRMWARE

$RIVERLEVEL

CEC?DISPLA

Y

C

$ISPLA

YMODULE,#$

(YPER4

ER

MINAL 

34-&X?3TD0ERIPH?$RIVER
STMFX?CECCSTMFX?GPIOC
STMFX?USARTCETC 

#%#DRIVERSTMB?EVAL?CECC
ORSTME?EVAL?CECC 

(ARDWARE

34-&XX

6ALUELINEEVALUATION

($-)#%#
CONTROLLER

AIB

BOARD

Summary of Contents for STM32F100 Series

Page 1: ...nics control HDMI CEC controller peripheral that supports the HDMI CEC v1 3a protocol The HDMI CEC controller provides a hardware support of this protocol and it supports the whole set of features off...

Page 2: ...ssing 13 1 4 7 Logical address allocation 13 1 5 STM32F100xx s HDMI CEC controller 14 1 5 1 Main features 15 1 5 2 HDMI CEC advanced features 16 2 Hardware environment 18 2 1 HDMI connector 18 2 1 1 I...

Page 3: ...AN3127 Contents Doc ID 16896 Rev 2 3 36 4 6 1 Receive information subscreen 31 4 6 2 Send information subscreen 32 5 Conclusion 34 6 Revision history 35...

Page 4: ...27 4 36 Doc ID 16896 Rev 2 List of tables Table 1 Logical addresses 13 Table 2 HDMI connector pinout 19 Table 3 STM32F100xx and HDMI CEC connection 22 Table 4 High level functions 25 Table 5 Document...

Page 5: ...7 Figure 10 HDMI cable 18 Figure 11 Application schematic 20 Figure 12 Electrical schematic proposal for STM32100B EVAL 21 Figure 13 Electrical schematic proposal for STM32100E EVAL 21 Figure 14 Examp...

Page 6: ...that has the ability to play media like a DVD player Recording device a device that has the ability to record a source such as an internal tuner or an external connection Source device a device that...

Page 7: ...o 10 audiovisual devices through standard HDMI cabling All transactions on the CEC line consist of an initiator and one or more followers The initiator is responsible for sending the message structure...

Page 8: ...llower 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 address 0xF is specially used for broadc...

Page 9: ...CEC communication By definition the HDMI system architecture consists of sources and sinks A given device may have one or more HDMI input s and output s Each HDMI input on the device should follow all...

Page 10: ...cification 100 kHz maximum clock rate The I2C bus is a standard two wire clock and data serial databus protocol Refer to the I2C specification for details Note that a HDMI sink may hold off the DDC tr...

Page 11: ...0 The source reads Enhanced EDID extension data at DDC address 0xA0 using segment pointer 0x60 1 4 3 Hot plug detect HPD signal A HDMI sink should not assert high voltage levels on its HPD pin when th...

Page 12: ...will read its physical address from the EDID on the CEC connected output Each sink and repeater is responsible for generating the physical address of all source devices connected to that device by app...

Page 13: ...EC_OAR register and in the upper nibble of the first byte of the transmitted message All CEC devices therefore have both a physical and a logical address whereas non CEC devices only have a physical a...

Page 14: ...e keeps that address This procedure continues until all possible type specific addresses have been checked if no type specific addresses are available the device should take the unregistered address 1...

Page 15: ...o match those of the TV One touch record used to make recordings by pressing a single button Timer programming any device can program a timer to start stop audio video recording System information all...

Page 16: ...LINE Block acknowledge error ACKE Start bit error SBE Rx block transfer finished error RTBFE Bit period error BPE Bit timing error BTE error free mode to allow safe communication with non tolerant CEC...

Page 17: ...st before entering the Stop mode the CEC prescaler should be reprogrammed to be in line with the HSI frequency by disabling the CEC peripheral To do so write PE 0 and wait until PE goes low writing th...

Page 18: ...2F100xx CEC solution CEC peripheral plus ESD protection circuit is fully compliant with the HDMI 1 3 standard The solution is already implemented on Value line evaluation boards Two HDMI connectors ar...

Page 19: ...s are power supply dependent An I C bus device with fixed input levels of 1 5 V and 3 V can have its own supply voltage A pull up resistor has to be connected to a 5 V 10 supply When devices with fixe...

Page 20: ...Hardware environment AN3127 20 36 Doc ID 16896 Rev 2 Figure 11 Application schematic...

Page 21: ...re 13 Electrical schematic proposal for STM32100E EVAL 2 K7 6 6 2 K7 2 0 3 3 6 6 0 6 6 0 6 54 3 3 5 3 3 0 N 2 0 2 0 2 0 N 2 K7 6 6 N 2 K7 2 K7 2 K7 2 K7 2 K7 4 N PIN PIN PIN PIN PIN 3 7 7 7 7 2 K7 6 6...

Page 22: ...valuation board to other Value line evaluation boards using HDMI cables or a simple wire between all CEC device lines PB8 If you choose the second solution do not forget to connect the grounds of all...

Page 23: ...he package Libraries folder contains all CMSIS files and the STM32F10x standard peripheral s Drivers CMSIS subfolder contains the STM32F10xxx CMSIS files device peripheral access layer and core periph...

Page 24: ...subfolders contain tool dependent preconfigured projects and workspaces Utilities folder STM32_EVAL implement an abstraction layer that interacts with the human interface resources buttons LEDs LCD a...

Page 25: ...ations and perform high end functionalities like sending and receiving messages Table 4 High level functions Function name Description HDMI_CEC_Init Initializes the HDMI CEC controller Enables the CEC...

Page 26: ...eportPhysicalAddress Reports the physical address to all other devices thus allowing any device to create a map of the network HDMI_CEC_CommandCallBack Handles the CEC command s receive callback Table...

Page 27: ...joystick push buttons or the s r l u and d keyboard keys respectively depending on the selected configuration Figure 17 CEC demonstration flowchart shows the menu system of the CEC demonstration After...

Page 28: ...dule Repeat from step 6 if you want to select another follower and send another command Reset the device if you want to select a different device type Figure 17 CEC demonstration flowchart 3YSTEM RESE...

Page 29: ...is used to allocate the physical address of each device If no CEC error is generated the CEC device executes the logical address allocation algorithm 4 4 Logical address allocation The selected devic...

Page 30: ...dress After that step only the addresses of the connected devices are displayed If no device is connected only the broadcast address is available If a new device is connected after the connected devic...

Page 31: ...erands Figure 21 Receive flowchart Figure 22 Receive information subscreen shows that the device has correctly received the frame from the sender with address 0x5 Sender address 0x5 The number of byte...

Page 32: ...name 4 6 2 Send information subscreen This subscreen is used to navigate among the connected device addresses by using the RIGHT and LEFT buttons After selecting the follower address you have to selec...

Page 33: ...6 Figure 23 Send flowchart Figure 24 Select CEC command EGIN ERROR 4 9ES O 9ES 2ETURN THE ERROR STATUS AI 3END FIRST BYTE AND SET 4 IF CURRENT BYTE IS THE LAST TO BE SENT ISABLE 4 AND DISPLAY THE SEND...

Page 34: ...uation 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 The STM32 Value line devices can easily hand...

Page 35: ...Revision history Doc ID 16896 Rev 2 35 36 6 Revision history Table 5 Document revision history Date Revision Changes 01 Mar 2010 1 Initial release 11 Oct 2010 2 Updated for high density value line de...

Page 36: ...ARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLE...

Reviews: