EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #250 background imageLoading...
Page #250 background image
Inter-integrated circuit interface (I2C)
UM1581
250/584
DocID023800 Rev 1
ï‚· I2C_Cmd()
ï‚· I2C_SoftwareResetCmd()
ï‚· I2C_ITConfig()
ï‚· I2C_StretchClockCmd()
ï‚· I2C_StopModeCmd()
ï‚· I2C_DualAddressCmd()
ï‚· I2C_OwnAddress2Config()
ï‚· I2C_GeneralCallCmd()
ï‚· I2C_SlaveByteControlCmd()
ï‚· I2C_SlaveAddressConfig()
ï‚· I2C_10BitAddressingModeCmd()
13.2.3 Communications handling functions
This section provides a set of functions that handles I2C communication.
Automatic End mode is enabled using I2C_AutoEndCmd() function. When Reload mode is
enabled via I2C_ReloadCmd() AutoEnd bit has no effect.
I2C_NumberOfBytesConfig() function set the number of bytes to be transferred, this
configuration should be done before generating start condition in master mode.
When switching from master write operation to read operation in 10Bit addressing mode,
master can only sends the 1st 7 bits of the 10 bit address, followed by Read direction by
enabling HEADR bit using I2C_10BitAddressHeader() function.
In master mode, when transferring more than 255 bytes Reload mode should be used to
handle communication. In the first phase of transfer, Nbytes should be set to 255. After
transferring these bytes TCR flag is set and I2C_TransferHandling() function should be
called to handle remaining communication.
In master mode, when software end mode is selected when all data is transferred TC flag
is set I2C_TransferHandling() function should be called to generate STOP or generate
ReStart.
ï‚· I2C_AutoEndCmd()
ï‚· I2C_ReloadCmd()
ï‚· I2C_NumberOfBytesConfig()
ï‚· I2C_MasterRequestConfig()
ï‚· I2C_GenerateSTART()
ï‚· I2C_GenerateSTOP()
ï‚· I2C_10BitAddressHeaderCmd()
ï‚· I2C_AcknowledgeConfig()
ï‚· I2C_GetAddressMatched()
ï‚· I2C_GetTransferDirection()
ï‚· I2C_TransferHandling()
13.2.4 SMBUS management functions
This section provides a set of functions that handles SMBus communication and timeouts
detection.
The SMBus Device default address (0b1100 001) is enabled by calling I2C_Init() function
and setting I2C_Mode member of I2C_InitTypeDef() structure to I2C_Mode_SMBusDevice.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals