USB configuration conflicts with RTC_SetTime
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-10-31 7:08 AM
Posted on October 31, 2013 at 15:08
Hi everybody,
I'm using a STM32 L152CB microcontroller with external clock. Initially I used it without USB and the RTC_SetTime worked. Since I configured the USB, the function (RTC_SetTime) doesn't work and my RTC_TimeTypeDef struct is always to 0 for each parameters (day, month, etc..) The micro's frequency is 16Mhz and the USB's clock is 48Mhz. Have you suggestions? Thanks! #rtc #clock #usb
This discussion is locked. Please start a new topic to ask your question.
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-10-13 2:56 AM
Posted on October 13, 2014 at 11:56
I can show all the project code if you want, but I'm afraid this will bother you since this will introduce lots of code.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-10-13 3:05 AM
Posted on October 13, 2014 at 12:05
I found the root cause. When USB enter and exit low power mode, as Suspend and Resume do, it calls stuffs like SystemInit to reinitialize the whole system. So adding reinitialization code of RTC right before RTC_SetTime solved this problem.

- « Previous
-
- 1
- 2
- Next »