-
Notifications
You must be signed in to change notification settings - Fork 11
rtc init #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @tcpipchip So check the clock config of the board you used (don't know which one) to see if LSE is well initialized. This kind of issue will be avoided when #9 will be implemented as RTC will be managed by STM32RTC and not hardly by the library. The error raised by error_handler is normal if RTC is not properly init. |
no problem Frederic! if (HAL_RTC_Init(&hrtc) != HAL_OK) This is my reference of config (LSM110A) |
When you reset and power always present, the RTC and clock are always on (backup domain) which could explain your issue. RTC uses the LSE and it is probably not ready when you plug on. I would advice to add the LSE config in the SystemCoreClock config to avoid this issue like the fix I've made for an other board: |
hi Fraderic Now STM32LoRaWAN is 100% working on LSM110A :) Thank you so much!
|
Btw, low power snergy (SLEEP) is implemented ? |
No. Stm32rtc library is required before manage low power |
thank you |
Hi team
Did you already got this problem ?
Error: C:\Users\Usuario\Documents\Arduino\libraries\STM32LoRaWAN-main\src\BSP\rt
c.c (56)
/** Initialize RTC Only
*/
hrtc.Instance = RTC;
hrtc.Init.AsynchPrediv = RTC_PREDIV_A;
hrtc.Init.OutPut = RTC_OUTPUT_DISABLE;
hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE;
hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;
hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;
hrtc.Init.OutPutPullUp = RTC_OUTPUT_PULLUP_NONE;
hrtc.Init.BinMode = RTC_BINARY_ONLY;
if (HAL_RTC_Init(&hrtc) != HAL_OK)
{
Error_Handler();
}
The text was updated successfully, but these errors were encountered: