Skip to content

Conversation

@matt001k
Copy link
Contributor

@matt001k matt001k commented Dec 9, 2025

What changed?

This addresses STM32U5 errata 2.2.26 in the lptimtick_u5.c module which states:

The device hangs up when it enters low-power modes (Stop 0, 1, 2, 3 / Standby / Shutdown) if the following
conditions are met:
• An asynchronous wake-up event or interrupt occurs within a short timing window (six HCLK‑cycles‑lengths)
before entering low‑power mode.
• A low-power mode code entry is executed from flash memory (ICACHE enabled or not).
• Flash prefetch is enabled.
• Flash latency is equal to or greater than four wait‑states.

How does it make Bristlemouth better?

The Aanderaa application was resetting at random intervals (2-45 minutes).
This fix addresses the reason why!

Where should reviewers focus?

The following link is to the errata.

Checklist

  • Add or update unit tests for changed code
  • Ensure all submodules up to date. If this PR relies on changes in submodules, merge those PRs first, then point this PR at/after the merge commit
  • Ensure code is formatted correctly with clang-format. If there are large formatting changes, they should happen in a separate whitespace-only commit on this PR after all approvals.

The STM32U5 might get stuck in low power mode if the WFI instruction is
not 128 bit aligned.
@matt001k matt001k merged commit e7f1ebe into develop Dec 9, 2025
1 check passed
@matt001k matt001k deleted the fix/aanderaa_errata_2.2.26 branch December 9, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants