Skip to content

Commit 7328e58

Browse files
authored
Merge pull request #14485 from boraozgen/feature/stm32-rtc-hse-review
STM32: RTC HSE support review changes
2 parents dce643b + c16a51d commit 7328e58

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

targets/TARGET_STM/rtc_api_hal.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extern "C" {
4747
#error "RTC clock configuration is invalid!"
4848
#endif
4949

50-
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE) && !(TARGET_STM32F2 || TARGET_STM32F3 || TARGET_STM32F4)
50+
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE) && !(TARGET_STM32F2 || TARGET_STM32F4 || TARGET_STM32F7)
5151
#error "RTC from HSE not supported for this target"
5252
#endif
5353

@@ -64,13 +64,14 @@ extern "C" {
6464
#endif
6565

6666
#if DEVICE_LPTICKER && !MBED_CONF_TARGET_LPTICKER_LPTIM
67+
68+
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE)
69+
#error "LPTICKER is not available with HSE as RTC clock source and should be removed from the target configuration."
70+
#endif
71+
6772
/* PREDIV_A : 7-bit asynchronous prescaler */
6873
/* PREDIV_A is set to set LPTICKER frequency to RTC_CLOCK/4 */
69-
#if (MBED_CONF_TARGET_RTC_CLOCK_SOURCE == USE_RTC_CLK_HSE)
70-
#define PREDIV_A_VALUE 124
71-
#else
7274
#define PREDIV_A_VALUE 3
73-
#endif
7475

7576
/** Read RTC counter with sub second precision
7677
*

0 commit comments

Comments
 (0)