-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[STM32F103] first I2C transaction always fails when PM_DEVICE_RUNTIME is enabled #58929
Comments
Hi @Oleh-Kravchenko! We appreciate you submitting your first issue for our open-source project. 🌟 Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙 |
Another workaround for the issue: diff --git a/drivers/i2c/i2c_ll_stm32.c b/drivers/i2c/i2c_ll_stm32.c
index 74e1db91ce..9e7cb9a01a 100644
--- a/drivers/i2c/i2c_ll_stm32.c
+++ b/drivers/i2c/i2c_ll_stm32.c
@@ -250,14 +250,6 @@ static int i2c_stm32_suspend(const struct device *dev)
{
int ret;
const struct i2c_stm32_config *cfg = dev->config;
- const struct device *const clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
-
- /* Disable device clock. */
- ret = clock_control_off(clk, (clock_control_subsys_t)&cfg->pclken[0]);
- if (ret < 0) {
- LOG_ERR("failure disabling I2C clock");
- return ret;
- }
/* Move pins to sleep state */
ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_SLEEP); |
@Oleh-Kravchenko Can you have a look to #59200 ? |
This is likely due to idle thread device resume logic and application-called driver logic fighting for the bus mutex. See #60939 (comment) |
Could you please be more specific? P.S. |
I believe that this could be related to this issue / PR: #62988. Is that possible @Oleh-Kravchenko ? |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Issue is still present |
Describe the bug
The first I2C transaction always fails when PM_DEVICE_RUNTIME is enabled on STM32F103.
I've stm32_min_dev_blue connected to the ssd1306 display.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ssd1306 should be initialized and ready to work.
Impact
Device driver error.
Logs and console output
Environment (please complete the following information):
Additional context
I've workaround the issue by adding a retry:
The text was updated successfully, but these errors were encountered: