From c594d6ee95e158582963bb3b216723e7fbfbea76 Mon Sep 17 00:00:00 2001 From: Jerome Coutant Date: Tue, 15 Feb 2022 15:38:11 +0100 Subject: [PATCH] STM32L1: build error with STM32L151xB MCU --- targets/TARGET_STM/rtc_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/TARGET_STM/rtc_api.c b/targets/TARGET_STM/rtc_api.c index 1c24b3f7f6b..3fb6cc73209 100644 --- a/targets/TARGET_STM/rtc_api.c +++ b/targets/TARGET_STM/rtc_api.c @@ -148,9 +148,9 @@ void rtc_init(void) error("RTC initialization failed\n"); } -#if !(TARGET_STM32F1) && !(TARGET_STM32F2) +#if !(TARGET_STM32F1) && !(TARGET_STM32F2) && !(STM32L151xB) /* STM32F1 : there are no shadow registers */ - /* STM32F2 : shadow registers can not be bypassed */ + /* STM32F2/STM32L151xB : shadow registers can not be bypassed */ if (HAL_RTCEx_EnableBypassShadow(&RtcHandle) != HAL_OK) { error("EnableBypassShadow error\n"); }