mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14485 from boraozgen/feature/stm32-rtc-hse-review
STM32: RTC HSE support review changespull/14463/head
commit
7328e588f1
|
@ -47,7 +47,7 @@ extern "C" {
|
||||||
#error "RTC clock configuration is invalid!"
|
#error "RTC clock configuration is invalid!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE) && !(TARGET_STM32F2 || TARGET_STM32F3 || TARGET_STM32F4)
|
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE) && !(TARGET_STM32F2 || TARGET_STM32F4 || TARGET_STM32F7)
|
||||||
#error "RTC from HSE not supported for this target"
|
#error "RTC from HSE not supported for this target"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -64,13 +64,14 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DEVICE_LPTICKER && !MBED_CONF_TARGET_LPTICKER_LPTIM
|
#if DEVICE_LPTICKER && !MBED_CONF_TARGET_LPTICKER_LPTIM
|
||||||
|
|
||||||
|
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE)
|
||||||
|
#error "LPTICKER is not available with HSE as RTC clock source and should be removed from the target configuration."
|
||||||
|
#endif
|
||||||
|
|
||||||
/* PREDIV_A : 7-bit asynchronous prescaler */
|
/* PREDIV_A : 7-bit asynchronous prescaler */
|
||||||
/* PREDIV_A is set to set LPTICKER frequency to RTC_CLOCK/4 */
|
/* PREDIV_A is set to set LPTICKER frequency to RTC_CLOCK/4 */
|
||||||
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE)
|
|
||||||
#define PREDIV_A_VALUE 124
|
|
||||||
#else
|
|
||||||
#define PREDIV_A_VALUE 3
|
#define PREDIV_A_VALUE 3
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Read RTC counter with sub second precision
|
/** Read RTC counter with sub second precision
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue