mirror of https://github.com/ARMmbed/mbed-os.git
Code misalignment correction
parent
b77627dd30
commit
2bc21a7641
|
@ -146,8 +146,8 @@
|
||||||
variable is updated automatically.
|
variable is updated automatically.
|
||||||
*/
|
*/
|
||||||
uint32_t SystemCoreClock = 32000000;
|
uint32_t SystemCoreClock = 32000000;
|
||||||
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||||
const uint8_t PLLMulTable[9] = {3, 4, 6, 8, 12, 16, 24, 32, 48};
|
const uint8_t PLLMulTable[9] = {3, 4, 6, 8, 12, 16, 24, 32, 48};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
*/
|
*/
|
||||||
uint32_t SystemCoreClock = 32000000;
|
uint32_t SystemCoreClock = 32000000;
|
||||||
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||||
const uint8_t PLLMulTable[9] = {3, 4, 6, 8, 12, 16, 24, 32, 48};
|
const uint8_t PLLMulTable[9] = {3, 4, 6, 8, 12, 16, 24, 32, 48};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
|
|
|
@ -72,8 +72,8 @@ void rtc_init(void)
|
||||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
||||||
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
|
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
|
||||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
|
||||||
error("Cannot initialize RTC with LSI\n");
|
error("Cannot initialize RTC with LSI\n");
|
||||||
}
|
}
|
||||||
rtc_freq = LSE_VALUE;
|
rtc_freq = LSE_VALUE;
|
||||||
#else
|
#else
|
||||||
// Reset Backup domain
|
// Reset Backup domain
|
||||||
|
@ -90,10 +90,10 @@ void rtc_init(void)
|
||||||
}
|
}
|
||||||
// Connect LSI to RTC
|
// Connect LSI to RTC
|
||||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
||||||
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
|
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
|
||||||
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
|
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) {
|
||||||
error("Cannot initialize RTC with LSI\n");
|
error("Cannot initialize RTC with LSI\n");
|
||||||
}
|
}
|
||||||
// This value is LSI typical value. To be measured precisely using a timer input capture for example.
|
// This value is LSI typical value. To be measured precisely using a timer input capture for example.
|
||||||
rtc_freq = 38000;
|
rtc_freq = 38000;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue