Skip to content
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

stm32f4xx: usart disable #4306

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

GabrielPavaloiu
Copy link
Contributor

Pull Request Overview

This pull request addes an usart disable API, to help reduce power consumption

Testing Strategy

This pull request was tested by disabling the usart and entering sleep mode, on a nucleo_f429zi board.

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

Added an usart disable API, to help reduce power consumption
@github-actions github-actions bot added the stm32 Change pertains to the stm32 family of MCUSs label Jan 13, 2025
Comment on lines 567 to 569
pub fn disable(&self) {
self.registers.cr1.modify(CR1::UE::CLEAR);
}
Copy link
Member

Choose a reason for hiding this comment

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

Should this guard against the case where UART is disabled when an operation is still in progress?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I added a check for ongoing transfers.

@lschuermann lschuermann added the last-call Final review period for a pull request. label Jan 14, 2025
@lschuermann lschuermann added this pull request to the merge queue Jan 15, 2025
Merged via the queue into tock:master with commit 95a5ea1 Jan 15, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
last-call Final review period for a pull request. stm32 Change pertains to the stm32 family of MCUSs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants