8000 Basic IWDG usage by zartavr · Pull Request #6 · everypinio/PwrBlock-sw · GitHub
[go: up one dir, main page]

Skip to content

Basic IWDG usage - #6

Open
zartavr wants to merge 15 commits into
everypinio:mainfrom
zartavr:feature/watchdog
Open

zartavr wants to merge 15 commits into
everypinio:mainfrom
zartavr:feature/watchdog

Conversation

@zartavr
@zartavr zartavr commented Oct 23, 2026 •
Copy link
Copy Markdown
Contributor

Changes:

  • Enable IWDG with a 4 s timeout, refreshed from the IDLE task hook
    • IWDG is frozen while the core is halted in debug (DBGMCU), so breakpoints don't reset the MCU
  • Blink the USR LED once (100 ms) after MCU peripherals are initialized, as a visible boot/reset indicator
    • Move LedName enum so the app and BSP layers use the same LED names

Limitations:

The watchdog only verifies that the IDLE task gets CPU time.
It will reset the MCU if any task spins without yielding for >4 s, but it will NOT detect tasks that are stuck in a blocked state.

Testing:

  • Busy loop injected in regulator task: MCU resets after ~4 s.
  • Breakpoint held for >4 s in debug session: no reset

@zartavr zartavr self-assigned this Oct 23, 2026
@zartavr
zartavr marked this pull request as draft October 23, 2026 14:09
@zartavr zartavr added the enhancement New feature or request label Oct 23, 2026
@zartavr
zartavr marked this pull request as ready for review October 26, 2026 11:05
@zartavr
zartavr requested a review from ioanlarionov October 26, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0