Skip to content

Commit a955223

Browse files
committed
STM32 RTC : Prescaler calculation issue
1 parent c40d860 commit a955223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_STM/rtc_api_hal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void rtc_deactivate_wake_up_timer(void);
8181

8282
/* PREDIV_S : 15-bit synchronous prescaler */
8383
/* PREDIV_S is set in order to get a 1 Hz clock */
84-
#define PREDIV_S_VALUE RTC_CLOCK / (PREDIV_A_VALUE + 1) - 1
84+
#define PREDIV_S_VALUE (RTC_CLOCK / (PREDIV_A_VALUE + 1) - 1)
8585

8686
/** Synchronise the RTC shadow registers.
8787
*

0 commit comments

Comments
 (0)