add stm32 nucleol476rg support

This commit is contained in:
Patrick Ting
2024-03-29 22:37:40 -07:00
committed by Ron Evans
parent 39029cc376
commit 22bf045c9a
6 changed files with 184 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
//go:build stm32 && stm32l4x6
package runtime
import (
"device/stm32"
)
/*
clock settings
+-------------+-----------+
| LSE | 32.768khz |
| SYSCLK | 80mhz |
| HCLK | 80mhz |
| APB1(PCLK1) | 80mhz |
| APB2(PCLK2) | 80mhz |
+-------------+-----------+
*/
const (
HSE_STARTUP_TIMEOUT = 0x0500
PLL_M = 1
PLL_N = 40
PLL_P = RCC_PLLP_DIV7
PLL_Q = RCC_PLLQ_DIV2
PLL_R = RCC_PLLR_DIV2
MSIRANGE = stm32.RCC_CR_MSIRANGE_Range4M
)