Update SystemCoreClock global variableĬlean project from any previous build then rebuild all. *- Use PA8 as MCO output at 48/16 = 3MHz -*/ } while ((SW_Status != RCC_CFGR_SWS_PLL) & (timeout > 0)) SW_Status = (RCC->CFGR & RCC_CFGR_SWS_Msk) Wait until PLL becomes main switch input Select the main PLL as system clock source * - Switching to PLL at 48MHz Now! Fasten your seat belt! -*/ * - Until this point, MCU was still clocked by HSI at 8MHz -*/ Enable FLASH Prefetch Buffer and set Flash Latency (required for high speed)įLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY } while ((PLL_Status = 0) & (timeout > 0)) PLL_Status = RCC->CR & RCC_CR_PLLRDY_Msk } while ((HSE_Status = 0) & (timeout > 0)) HSE_Status = RCC->CR & RCC_CR_HSERDY_Msk Now, edit main.c with a very minimal code: /*
Use the above buttons to add /remove or edit include paths.Īpply all this settings, and then return to the main window.
Basically you may want a minimal set of BSP functions for working with LED, Push-button, and debug console (printf). Start a new empty C Project and copy a minimal set of source files in order to have a basic (e.g. The foundation : A clean bare-metal working project You may refer to above tutorials for more details on installing and using Atollic IDE.ġ. FreeRTOS tutorials have been tested and illustrated using Atollic TrueStudio® for STM32 IDE.