mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/system_clock.c
- Revision:
- 187:0387e8f68319
- Parent:
- 182:a56a73fd2a6f
--- a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/system_clock.c Fri Jun 22 16:45:37 2018 +0100 +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/TARGET_NUCLEO_L053R8/system_clock.c Thu Sep 06 13:40:20 2018 +0100 @@ -29,7 +29,7 @@ */ #include "stm32l0xx.h" -#include "mbed_assert.h" +#include "mbed_error.h" /*!< Uncomment the following line if you need to relocate your vector Table in Internal SRAM. */ @@ -55,7 +55,7 @@ * @param None * @retval None */ -void SystemInit (void) +void SystemInit(void) { /*!< Set MSION bit */ RCC->CR |= (uint32_t)0x00000100U; @@ -112,8 +112,8 @@ if (SetSysClock_PLL_HSI() == 0) #endif { - while(1) { - MBED_ASSERT(1); + { + error("SetSysClock failed\n"); } } } @@ -145,7 +145,7 @@ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); /* Enable HSE and HSI48 oscillators and activate PLL with HSE as source */ - RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_HSI48; + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_HSI48; if (bypass == 0) { RCC_OscInitStruct.HSEState = RCC_HSE_ON; /* External 8 MHz xtal on OSC_IN/OSC_OUT */ } else {