github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/runtime/runtime_stm32l4x5.go (about)

     1  //go:build stm32 && stm32l4x5
     2  
     3  package runtime
     4  
     5  import (
     6  	"device/stm32"
     7  )
     8  
     9  /*
    10  clock settings
    11  
    12  	+-------------+-----------+
    13  	| LSE         | 32.768khz |
    14  	| SYSCLK      | 120mhz    |
    15  	| HCLK        | 120mhz    |
    16  	| APB1(PCLK1) | 120mhz    |
    17  	| APB2(PCLK2) | 120mhz    |
    18  	+-------------+-----------+
    19  */
    20  const (
    21  	HSE_STARTUP_TIMEOUT = 0x0500
    22  	PLL_M               = 1
    23  	PLL_N               = 60
    24  	PLL_P               = RCC_PLLP_DIV2
    25  	PLL_Q               = RCC_PLLQ_DIV2
    26  	PLL_R               = RCC_PLLR_DIV2
    27  
    28  	MSIRANGE = stm32.RCC_CR_MSIRANGE_Range4M
    29  )