zephyr: drivers: spi: stm32: Broken device power management on SPI bus
With PR #72991, the SPI driver does not work with PM device + runtime features enabled.
The bug was reproduced on the STM32WL device.
Steps to reproduce:
-
In
samples/subsys/lorawan/class_aaddCONFIG_PM_DEVICE=yandCONFIG_PM_DEVICE_RUNTIME=ytoprj.conf. -
Build the sample:
west build -b lora_e5_mini -
Debug the sample (
west debug), set the breakpoint to themainfunctionb main, and run the code. -
The
mainfunction is never hit as it is stuck in the SPI driver (spi_ll_stm32.c:878- intransceivefunction).
When I reverted the commit 858e8c51f1f42abb0afe62a4d701e69b7a6bd2b1 from PR #72991, the sample works as expected even with the above PM device options enabled.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19 (14 by maintainers)
No that’s fine. You did it correctly. We’ll need to investigate
We were able to fix the problem by setting the clock in the dts
stm32_lp_tick_source, but maybe it was a different problem.@erwango The PR https://github.com/zephyrproject-rtos/zephyr/pull/72703 was merged on May 24, 2024. My report was on Aug 17, 2024; I tested it on top of the main branch at that time. But I can try again with my above-provided test instructions.