-
Notifications
You must be signed in to change notification settings - Fork 1k
STM32 I2C driver "repeated start" issue #583
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
Comments
Hi Jean-Marc, |
Hi Frédéric, Enjoy your holidays ! |
Thanks, enjoy too. The function has been renamed in newer STM32CubeFW Release for or MISRA-C 2012 compliancy: I guess at term all series will be renamed. The next cube update add this too for some of this series, see #566. |
Fixed by #590 |
During non reg tests for 1.7.0 release found issue with STM32 F2 and F4 related to #590. |
Hello,
I'm trying to connect to the MMA8451 accelerometer. This chip requires an I2C driver with repeated-start feature enabled to discuss with.
I've a NUCLEO-F411RE, lib 1.6.1 and no repeated start is generated due to some low level limitations.
Let me explain:
XferOptions variable is always set to
I2C_NO_OPTION_FRAME
in theHAL_I2C_Transmit_IT
. So, once the Xfer is completed, it firesI2C_MasterTransmit_TXE
. As the following condition is always false (stm32f4xx_hal_i2c.c):if ((CurrentXferOptions != I2C_FIRST_AND_LAST_FRAME) && (CurrentXferOptions != I2C_LAST_FRAME) && (CurrentXferOptions != I2C_NO_OPTION_FRAME))
a STOP will be generated (line 5025):
Does someone can confirm ?
How could we override XferOptions by setting to
I2C_LAST_FRAME_NO_STOP
?Ok, I understand that it's not directly related to the framework by itself, but I observed that I2C driver is really different regarding the variant.
In other word, by using
TwoWire::endTransmission(false)
, it should not send a STOP condition (instead of UNUSED(endStop) ).Thank you,
jean-marc
The text was updated successfully, but these errors were encountered: