F4.6: gestión de energía + causa de reset (fix bucle IWDG F769)#84
Merged
Conversation
…WDG en F769 - Nuevo módulo `reset` (HAL F4 y F7, gemelos): lee y limpia RCC_CSR para distinguir la causa del último reset (power-on, brownout, pin, software, IWDG, WWDG, low-power) y la publica como `&'static str`. - El kernel almacena la causa de reset (`set_reset_cause`/`reset_cause`) y la consola la muestra en el comando `faults`. Los ejemplos la leen al arrancar. - Fix del bucle de reset IWDG en F769: la init de modo windowed perdía silenciosamente los writes de PR/RLR (corría con defaults /4 + 0xFFF → ~1 s), reseteando antes del primer kick. Se aplica la secuencia canónica (RM0410/ RM0090): arrancar el IWDG primero (KEY_START enciende el LSI), luego habilitar escritura y programar PR/RLR/WINR esperando a que cada flag SR.PVU/RVU/WVU se limpie. Espera acotada para no colgar el arranque si el LSI fallara. Validado en F407 (estable en safe-mode) y F769 (ya no entra en bucle de reset: supervisor vivo a 1/2/3/4/5 s en safe-mode). CI host: 29 tests OK. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Resumen
reset(HAL F4 y F7, gemelos) que lee/limpiaRCC_CSRy publica la causa del último reset (power-on, brownout, pin, software, IWDG, WWDG, low-power). El kernel la almacena y la consola la muestra enfaults./4+0xFFF→ timeout ~1 s) y reseteaba antes del primer kick (~1.5 s). Se aplica la secuencia canónica RM0410/RM0090: KEY_START primero (enciende LSI), luego habilitar escritura y programar PR/RLR/WINR esperando a que cada flagSR.PVU/RVU/WVUse limpie (espera acotada).Validación
Test plan
🤖 Generated with Claude Code