I2C Busy flag always set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-06 7:16 AM
Hello
i using STM32F103ZET6 & STM32CubeMX V4.22.0 & Firmware F1 V1.6
i want Send Data Via I2c But HAL_I2C_Master_Transmit Return HAL_BUSY
i Remove My I2c device (AT24C512) but Still
HAL_I2C_Master_Transmit Return
HAL_BUSY
How can I fix this problem?
Thank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-06 7:25 AM
Do you have external pull up resistors on the SDA/SCL pins?
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
‎2017-09-06 8:07 AM
I thought I found the problem
When I comment on the code below, it works correctly and
HAL_I2C_Master_Transmit
Return HAL_TIMEOUT
__HAL_AFIO_REMAP_I2C1_ENABLE();
but why ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-06 9:31 AM
yes i do , i using resistors 10k on sda/scl
But HAL_I2C_Master_Transmit Return HAL_BUSY- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-09-06 9:50 AM
Ok, then look at how the pins vs peripheral are initialized, the F1 parts were always a bit awkward in terms of when the I2C bus was enabled wrt the state of the pins. Not familiar with HAL implementation on the F1.
Up vote any posts that you find helpful, it shows what's working..
