mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
b0ea05a853
Previously, there was no specific stm32f4r5.svd in lib/stm32-svd, just stm32f4x5.svd was used; now, both files are present. This means that the existing build-tag stm32f4r5 will include the device/stm32/stm32f4r5.go file, and the additional build-tag stm32f4x5 would include the device/stm32/stm32f4x5.go file as well, resulting in build conflicts. Renaming just the tag, which is used in src/machine, and src/runtime, into stm32f4y5 solves this issue.
30 lines
546 B
Go
30 lines
546 B
Go
//go:build stm32 && stm32l4y5
|
|
|
|
package runtime
|
|
|
|
import (
|
|
"device/stm32"
|
|
)
|
|
|
|
/*
|
|
clock settings
|
|
|
|
+-------------+-----------+
|
|
| LSE | 32.768khz |
|
|
| SYSCLK | 120mhz |
|
|
| HCLK | 120mhz |
|
|
| APB1(PCLK1) | 120mhz |
|
|
| APB2(PCLK2) | 120mhz |
|
|
+-------------+-----------+
|
|
*/
|
|
const (
|
|
HSE_STARTUP_TIMEOUT = 0x0500
|
|
PLL_M = 1
|
|
PLL_N = 60
|
|
PLL_P = RCC_PLLP_DIV2
|
|
PLL_Q = RCC_PLLQ_DIV2
|
|
PLL_R = RCC_PLLR_DIV2
|
|
|
|
MSIRANGE = stm32.RCC_CR_MSIRANGE_Range4M
|
|
)
|