stm32: U5 time-driver-lptim improvements#6536
Merged
Merged
Conversation
U3/u5 uses the same registers as WBA, so expand the LPTIMv2a feature gating to these chips. One difference is that the default clock is Msik, not Pclk1, ensure_lptim_clk!() calls have been adjusted accordingly.
Two RCC register values were missing to allow time-driver-lptimX to wake from STOP on u5/u3: - LPTIM1AMEN: enable LPBAM/timer autonomous mode in Stop0/1/2 - APB3SMEN: keep the APB clock available to route timer interrupts to NVIC in Stop mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi folks,
I've tried to get time-driver-lptim working on stm32u5, and found a couple of small changes were needed. Effectively, this PR just expands #5963 to the equivalently-operating u3/u5 chips.
I'm reasonably new to the innards of embassy, so please advise if there are smarter ways to handle this. Also note, I've only tested this on u575, but during a review of my patch, AI suggested that this should also apply to u3, so I've included U3 too. The stm32-data table supports this, but I have no u3 to test on.
Best,
K