Fix boot for CKS32F407 when -Os is used

This commit is contained in:
Silvano Seva 2024-05-12 12:23:09 +02:00
parent 1c51bf0136
commit 9c6293759a
1 changed files with 2 additions and 0 deletions

View File

@ -312,6 +312,8 @@ static void SetSysClock(void)
{
/* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */
RCC->APB1ENR |= RCC_APB1ENR_PWREN;
__DSB();
PWR->CR |= PWR_CR_VOS;
/* HCLK = SYSCLK / 1 */