cancel
Showing results for 
Search instead for 
Did you mean: 

About I2C_DutyCycle and I2C_OwnAddress1

viprobin
Associate
Posted on January 14, 2012 at 07:29

I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2;

I2C_InitStructure.I2C_OwnAddress1 = 0x33;

/** @defgroup I2C_duty_cycle_in_fast_mode

  * @{

  */

#define I2C_DutyCycle_16_9              ((uint16_t)0x4000) /*!< I2C fast mode Tlow/Thigh = 16/9 */

#define I2C_DutyCycle_2                 ((uint16_t)0xBFFF) /*!< I2C fast mode Tlow/Thigh = 2 */

#define IS_I2C_DUTY_CYCLE(CYCLE) (((CYCLE) == I2C_DutyCycle_16_9) || \

                                  ((CYCLE) == I2C_DutyCycle_2))

I'd like to know when I should choose I2C_DutyCycle_16_9. And the value of the I2C_OwnAddress1 could be any 7-bit or 10-bit address, couldn't it?
2 REPLIES 2
PeppeST
ST Employee
Posted on February 15, 2012 at 17:32

Someone can help on that?

Posted on February 15, 2012 at 18:43

Someone can help on that?

You're staff here, the rest of us are just running round the asylum. You might want to get some FAE's to participate.

The duty is a fudge to get around the short comings of the prescaler.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/I2C Fast Mode 400KHz&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=284]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FI2C%20Fast%20Mode%20400KHz&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=284

Own addresses are for slaves, I don't think it supports 10-bit mode.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..