Detect case of no clock selected in RTCv3 (causes init to hang)

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13145 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
cinsights 2019-10-24 10:57:47 +00:00
parent 14049cf6a2
commit 82f2fdb126
1 changed files with 5 additions and 1 deletions

View File

@ -173,8 +173,12 @@
#error "RTC clock not exported by HAL layer"
#endif
#if STM32_RTCCLK == 0
#error "RTC has no clock source selected"
#endif
#if STM32_PCLK1 < (STM32_RTCCLK * 7)
#error "STM32_PCLK1 frequency is too low"
#error "STM32_PCLK1 frequency is too low for RTC"
#endif
/**