Skip to content

Conversation

@FRASTM
Copy link
Contributor

@FRASTM FRASTM commented Feb 22, 2021

With this change, the spi driver of the stm32 soc, is prepared to enter/exit the low power mode.

The SPI executes the spi_stm32_set_power_state from the spi_stm32_pm_control to have a clean configuration before entering/exiting the low power mode.
This is the case with stm32wb55 and stm32l47 as first targets devices, which are using the lptimer.
On wakeup, the clocks are re-configured thanks to the stm32_clock_control_init function called directly in the
pm_power_state_exit_post_ops of each soc.
This method is similar to what was done on the UART.
A new sample application is added to demonstrate the operations on the SPI driver.

Signed-off-by: Francois Ramu [email protected]

This will activate the LPTIM for the test sequence
once the power management is enabled

Signed-off-by: Francois Ramu <[email protected]>
This sample uses the lptim when calling the k_sleep
for the STM32xx from STMicroelectronics.
Using new DT for button and Led,
Button is ready to exit from low power state.

Signed-off-by: Francois Ramu <[email protected]>
FRASTM added 2 commits March 2, 2021 09:10
This sample uses is demonstrating the spi transfer followed by
a low power period. The lptim is the timer to program the low power
mode. The button is ready to exit from low power state.

Signed-off-by: Francois Ramu <[email protected]>

/* Configure LEDs */
gpio_led = device_get_binding(LED0);
if (gpio_led == NULL) {
Copy link
Member

Choose a reason for hiding this comment

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

You can assert here, or log the error, otherwise it will silent fail what is not that helpful.

@github-actions
Copy link

This pull request 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 pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jul 14, 2021
@github-actions github-actions bot closed this Jul 30, 2021
@ycsin
Copy link
Member

ycsin commented Dec 14, 2021

@FRASTM hey, do you still plan to push this forward?
I have a similar PR at #36681, from what I read in the reference manual the changes to the SPI driver should be enough, I'm wondering if there's anything else stopping you from pushing this forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants