Skip to content
Snippets Groups Projects
Commit 30af14ff authored by Carsten Thiele's avatar Carsten Thiele
Browse files

Prevent overwrite of HSITRIM default-value

parent ff1673b4
No related branches found
No related tags found
No related merge requests found
...@@ -807,8 +807,8 @@ asm volatile( ...@@ -807,8 +807,8 @@ asm volatile(
void SystemInit48HSI( void ) void SystemInit48HSI( void )
{ {
// Values lifted from the EVT. There is little to no documentation on what this does. // Values lifted from the EVT. There is little to no documentation on what this does.
RCC->CTLR = RCC_HSION | RCC_PLLON; // Use HSI, but enable PLL.
RCC->CFGR0 = RCC_HPRE_DIV1 | RCC_PLLSRC_HSI_Mul2; // PLLCLK = HSI * 2 = 48 MHz; HCLK = SYSCLK = APB1 RCC->CFGR0 = RCC_HPRE_DIV1 | RCC_PLLSRC_HSI_Mul2; // PLLCLK = HSI * 2 = 48 MHz; HCLK = SYSCLK = APB1
RCC->CTLR |= RCC_HSION | RCC_PLLON; // Use HSI, but enable PLL.
FLASH->ACTLR = FLASH_ACTLR_LATENCY_1; // 1 Cycle Latency FLASH->ACTLR = FLASH_ACTLR_LATENCY_1; // 1 Cycle Latency
RCC->INTR = 0x009F0000; // Clear PLL, CSSC, HSE, HSI and LSI ready flags. RCC->INTR = 0x009F0000; // Clear PLL, CSSC, HSE, HSI and LSI ready flags.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment