Skip to content

Fix I2C bug for F4 platforms in IT mode #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2017
Merged

Conversation

cparata
Copy link
Contributor

@cparata cparata commented Nov 21, 2017

Hi all,
this patch should fix this bug. I successfully tested it with Nucleo-F401RE and X-NUCLEO-NFC01A1 and X-NUCLEO-NFC04A1. In order to fix it, I took inspiration by Cube HAL examples for I2C in IT mode. Please, let me know if it works also on your side.
Best Regards,
Carlo

Copy link
Member

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change will improve stability and robustness.
Neverthless I would also expect drivers (like eeprom drivers or NFC drivers) to call i2c_IsDeviceReady(à until the device is ready and before issuing the read or write requests. If the drivers behave like proposed, then the read or write operations would work without AF errors.

@cparata
Copy link
Contributor Author

cparata commented Nov 21, 2017

Unfortunately, it seems that the "i2c_IsDeviceReady" is only a low level API that is not available in the Wire library. So we cannot use that API for Arduino libraries. Anyway, the proposed patch should fix the I2C issue without any change in the Wire library.

@LMESTM
Copy link
Member

LMESTM commented Nov 21, 2017

@cparata ok looks good to me !

@fpistm
Copy link
Member

fpistm commented Nov 22, 2017

This Fix #153

@fpistm fpistm merged commit cb891ec into stm32duino:master Nov 22, 2017
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
Fix I2C bug for F4 platforms in IT mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I2C broken on STM32F4 since IT mode used
3 participants