Im new to CubeIDE. When Setting up RCC (Low speed clock) to crystal resonator and adding clock and calendar in RTC, it says the HAL_RTC_Init is not defined.. how can I fix this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-02-28 9:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 6:19 AM
It means that the HAL RTC files haven't been included. Open up the *_hal_conf.h file and RTC module is enabled with the line:
#define HAL_RTC_MODULE_ENABLED
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 10:14 PM
@TDK​
As in, put this line in main? If so it still shows the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 10:19 PM
@TDK​ if u mean to enable it looks like it is already enabled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 10:20 PM
No, in *_hal_conf.h. The line should already be in there, ensure it's not commented.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 10:21 PM
Include your IOC file if you can, or project code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 11:07 PM
Yes the above picture in inside hal_conf.h as you can see the second last define shows it has been enabled by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 11:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-02 6:32 AM
I'm not sure, looks like it should be working. Can you post the exact error message(s) you're getting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-02 9:10 AM
