aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/powerctrl.h
AgeCommit message (Collapse)Author
2020-08-29stm32/powerctrl.h: Include stdbool.h to get definition of bool.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2019-07-08stm32/powerctrl: Move L0's SystemClock_Config to powerctrlboot.c file.Damien George
2019-06-25stm32: Enter bootloader via a system reset.Damien George
Entering a bootloader (ST system bootloader, or custom mboot) from software by directly branching to it is not reliable, and the reliability of it working can depend on the peripherals that were enabled by the application code. It's also not possible to branch to a bootloader if the WDT is enabled (unless the bootloader has specific provisions to feed the WDT). This patch changes the way a bootloader is entered from software by first doing a complete system reset, then branching to the desired bootloader early on in the start-up process. The top two words of RAM (of the stack) are reserved to store flags indicating that the bootloader should be entered after a reset.
2018-11-28stm32/powerctrl: Move (deep)sleep funcs from modmachine.c to powerctrl.cDamien George
2018-09-24stm32/powerctrl: Factor code that configures PLLSAI on F7 MCUs.Damien George
2018-09-24stm32/powerctrl: Factor code to set RCC PLL and use it in startup.Damien George
This ensures that on first boot the most optimal settings are used for the voltage scaling and flash latency (for F7 MCUs). This commit also provides more fine-grained control for the flash latency settings.
2018-09-24stm32/powerctrl: Move function to set SYSCLK into new powerctrl file.Damien George
Power and clock control is low-level functionality and it makes sense to have it in a dedicated file, at least so it can be reused by other parts of the code.