drivers: rtc: stm32: fix clk enable call
On STM32WBAX series, there is no bit in BCDR register to enable RTC. Enabling RTC is done directly via the RCC APB register bit. Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
This commit is contained in:
parent
c085177af5
commit
b1f878f7a5
1 changed files with 6 additions and 0 deletions
|
@ -356,11 +356,17 @@ static int rtc_stm32_init(const struct device *dev)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
/*
|
||||
* On STM32WBAX series, there is no bit in BCDR register to enable RTC.
|
||||
* Enabling RTC is done directly via the RCC APB register bit.
|
||||
*/
|
||||
#ifndef CONFIG_SOC_SERIES_STM32WBAX
|
||||
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
|
||||
|
||||
LL_RCC_EnableRTC();
|
||||
|
||||
z_stm32_hsem_unlock(CFG_HW_RCC_SEMID);
|
||||
#endif /* CONFIG_SOC_SERIES_STM32WBAX */
|
||||
|
||||
err = rtc_stm32_configure(dev);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue