the code from st example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-19 4:08 AM
I2C_Cmd(sEE_I2C, ENABLE);
/* sEE_I2C configuration after enabling it */
I2C_Init(sEE_I2C, I2C_SPEED, I2C_SLAVE_ADDRESS7, I2C_Mode_I2C, I2C_DutyCycle_2,
I2C_Ack_Enable, I2C_AcknowledgedAddress_7bit);
do the init order have some problem?
below one is common:
void Init(void)
{
I2C_DeInit(I2C1);
I2C_Init(I2C1,IICSPEED, host_address, I2C_Mode_I2C,I2C_DutyCycle_2, I2C_Ack_Enable, I2C_AcknowledgedAddress_7bit);
I2C_Cmd(I2C1,ENABLE);
}
I2C_Cmd(sEE_I2C, ENABLE);
I2C_DeInit(sEE_I2C);
/* sEE_I2C configuration after enabling it */
I2C_Init(sEE_I2C, I2C_SPEED, I2C_SLAVE_ADDRESS7, I2C_Mode_I2C, I2C_DutyCycle_2,
I2C_Ack_Enable, I2C_AcknowledgedAddress_7bit);
is there some bug like above
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-19 7:56 AM
I think I'd have the Cmd before the DeInit.
For ST's I2C the usual means to set up is Cmd then Init, issue with the pins and I2C peripheral getting stuck in BUSY state.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-19 7:56 AM
I think I'd have the Cmd before the DeInit.
For ST's I2C the usual means to set up is Cmd then Init, issue with the pins and I2C peripheral getting stuck in BUSY state.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-12-19 7:08 PM
issue with the pins and I2C peripheral getting stuck in BUSY state?
could you say more about it
