-
Notifications
You must be signed in to change notification settings - Fork 7.5k
STM32 I2C hang #8915
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
Does PR #9301 helps with this issue? |
@ydamigos |
@erwango @ydamigos
|
As you can see in the scope trace the last transaction is malformed, and does not generate any event for the s/w which hangs. I can reproduce the issue even on sensor HTS221 on a different I2C bus, provided that I configure the bus in Standard Mode (100k bitrate) |
If this is happening at low speed, isn't it linked to GPIO speed being too fast now (and producing rebounds)? Can you have a try? |
Well, are you talking about the gpio speed we changed for SPI/I2S? |
My bad, mixed topics. Forget about it. |
@erwango any update on this? |
@nashif , @avisconti working on it, but in holidays right now. Should be back next week if i'm correct. |
@avisconti any updates? |
@nashif |
@nashif @erwango The issue seems to be related to repeated start timing violation (tSU;STA) in some particular conditions. We still need to confirm this. The issue happens in Standard-mode only (no issue in Fast-mode). A |
ok, moving to 1.14 |
I'm running into the same or similar issue, however my issue takes quite a bit of time to reproduce (~2316500ms) blinking at a rate of 500ms (after ~4633*2 transfers). I've also seen it trigger as low as after ~2000 transfers. To blink an led off of a port expander, I have to do both a I have also seen something similar with |
I solved my issue by locking around each transfer with |
@psidhu |
I'm going to close this issue as it is open since long time. I'm summarizing all the findings hereafter:
|
As explained in issue zephyrproject-rtos#8915 the STM32F4xx SoC family I2C does not work well in Standard mode (100KHz). So let's configure i2c3 in Fast mode (400KHz). Signed-off-by: Armando Visconti <[email protected]>
As explained in issue #8915 the STM32F4xx SoC family I2C does not work well in Standard mode (100KHz). So let's configure i2c3 in Fast mode (400KHz). Signed-off-by: Armando Visconti <[email protected]>
I can reproduce this issue very easily using the ArgonKey board, where I recently add usage of LP3943 driver to turn on/off leds at boot time. More precisely, the issue seems to happen when using the 'led blink' feature of the driver. The blink routine call the i2c_reg_update_byte(), which does a read operation on a register followed by a write operation. The STM32F4 seems to get stuck inside the i2c_stm32_transfer() routine, where a loop for all msgs in the i2c transaction is performed.
In addition to the above, I noticed that the issue showed up after the cc41916 (i2c: stm32: check messages before starting transmission) was committed, but I think that this commit just highlighted some weaknesses already present somewhere.
The text was updated successfully, but these errors were encountered: