mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
stm32/powerctrl: Support changing frequency on WB MCUs.
This allows changing the frequency to: 100kHz, 200kHz, 400kHz, 800kHz, 1MHz, 2MHz, 4MHz, 8MHz, 16MHz, 32MHz, 64MHz. For frequencies 2MHz and below, low power run (LPR) mode is enabled automatically. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "irq.h"
|
||||
#include "powerctrl.h"
|
||||
|
||||
static inline void powerctrl_config_systick(void) {
|
||||
void powerctrl_config_systick(void) {
|
||||
// Configure SYSTICK to run at 1kHz (1ms interval)
|
||||
SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK;
|
||||
SysTick_Config(HAL_RCC_GetHCLKFreq() / 1000);
|
||||
|
||||
Reference in New Issue
Block a user