- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I lose my date time when VDD power lost. We do have a battery connected to VBAT.
I think we are missing some configuration for enabling battery back up.
We are doing the following:
[..] To enable access to the RTC Domain and RTC registers, proceed as follows:
Enable the Power Controller (PWR) APB1 interface clock using the
RCC_APB1PeriphClockCmd() function.
Enable access to RTC domain using the PWR_BackupAccessCmd() function.
Select the RTC clock source using the RCC_RTCCLKConfig() function.
Enable RTC Clock using the RCC_RTCCLKCmd() function.
Is there more we need to do?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raktim Roy wrote:
With just WICED_ENABLE_MCU_RTC defined, in my setup I am able to set up the time. Please check the same in your setup and update the thread.
Do you notice the platform_rtc_init() always set the time to default_rtc_time?
i.e. Everytime you reboot or reset the device, the rtc time is reset to wrong time.
I reported it very long time ago in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please mention the platform setup that you are using (Maybe attach the schematic if you are not using any Cypress EVK)? When VDD power is lost, It should automatically switch to VBAT and you should see the PWR LED ON. From your response I am not really sure if that's the case. Do you see the PWR LED is ON and are you still losing the date and time (assuming you have already enabled WICED_ENABLE_MCU_RTC)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using a custom board.
We did not have WICED_ENABLE_MCU_RTC enabled. When we do and have WICED_DISABLE_MCU_POWERSAVE defined, I can't set the time as I could before. I get an error from RTC_EnterInitMode() in RTC_SetTime().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please do not use WICED_DISABLE_MCU_POWERSAVE macro while using the RTC. If you check the platform_rtc.c (43xxx_Wi-Fi/WICED/platform/MCU/STM32F4xx/peripherals/platform_rtc.c) code, some of the APIs are defined only if that macro is not defined which are crucial for the functioning of RTC. So, please remove that and then check the RTC_SetTime(). Any particular reason that you want to disable the MCU powersave? With just WICED_ENABLE_MCU_RTC defined, in my setup I am able to set up the time. Please check the same in your setup and update the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I reported below:
https://community.cypress.com/message/160463
The correct fix should be fix the sdk to init RTC no matter WICED_DISABLE_MCU_POWERSAVE is set or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raktim Roy wrote:
With just WICED_ENABLE_MCU_RTC defined, in my setup I am able to set up the time. Please check the same in your setup and update the thread.
Do you notice the platform_rtc_init() always set the time to default_rtc_time?
i.e. Everytime you reboot or reset the device, the rtc time is reset to wrong time.
I reported it very long time ago in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Disabled calling platform_rtc_set_time( &default_rtc_time ); and it works!
Thanks!