Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
YongseokJeon
Level 4
Level 4
Distributor
50 replies posted 50 questions asked 25 replies posted

Hi,
I am using CY8CKIT-062S2-43012 and testing RTC with Vbackup.

First, I removed R76(0ohm) to separate Vbackup and VDDD.

a.JPG
And I applied 2.5V to Vbackup through an external power supply.

I have disabled the below part in the cyhal_rtc_init function in Cyhal_rtc.c so that the RTC time is not initialized.
That is, I only modified the below part in the [RTC Basics] example.

cy_rslt_t cyhal_rtc_init(cyhal_rtc_t *obj)
{
CY_UNUSED_PARAMETER(obj);
CY_ASSERT(NULL != obj);
cy_rslt_t rslt = CY_RSLT_SUCCESS;
if (_cyhal_rtc_get_state() == _CYHAL_RTC_STATE_UNINITIALIZED)
{

#if 0
if (Cy_RTC_IsExternalResetOccurred())
{
// Reset to default time
static const cy_stc_rtc_config_t defaultTime = {
.dayOfWeek = CY_RTC_SATURDAY,
.date = 1,
.month = 1,
.year = 0,
};
Cy_RTC_SetDateAndTime(&defaultTime);
_cyhal_rtc_set_century(_CYHAL_RTC_INIT_CENTURY);
}
#endif


Test-1. Under the conditions below, the RTC has an error of 15 seconds after 1 hour.
1. VDDD off (USB cable not connected)
2. Apply 2.5V to Vbackup

Test-2. Under the conditions below, the RTC time is nearly accurate after 1 hour.
1. VDDD on (USB cable connected)
2. Apply 2.5V to Vbackup

Q) I thought the RTC tolerance would only be affected by the accuracy of the WCO regardless of the power supply.
Is RTC accuracy also affected by VDDD?
I am attaching the project file I tested.

Thanks and Regards,
YS

0 Likes
2 Replies
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @YongseokJeon 

There are two things I noticed:

1. In your project design configuration (design.modus) you have set the VBACKUP voltage to 3300mV. You can set it 2500mV which is the actual voltage you are supplying.

Ekta_0-1667565145895.png

 

2. Another thing I noticed in the architecture TRM of the PSoC 6 device is that the RTC block has two inputs to the backup power switch: VDDD and VBACKUP. 

When VDDBAK_CTL(of the BACKUP_CTL register) =  0(Default mode): Selects VDDD when
the brownout detector in the system resources is enabled and no brownout situation is detected (see the
Power Supply and Monitoring chapter on page 218 for more details). Otherwise, it selects the highest supply
among VDDD and VBACKUP. This might have caused the supply to change to VDDD when 3.3 V is supplied.


Ekta_1-1667565379665.png

I would suggest you to conduct a test by changing the board configuration to run at 1.8V (setting J14 jumper such that 1 and 2 pins are shorted) such that VDDD< VBACKUP always and chaging the VBACKUP value in device configurator to 2500mV. 

This would help us to check if the Voltage actually affects the RTC.
Please report your oservation to this thread.

Best Regards
Ekta

 

 

0 Likes
YongseokJeon
Level 4
Level 4
Distributor
50 replies posted 50 questions asked 25 replies posted

Hi, Ekta.
Thank for your reply.

I shorted J14 to pins 1,2 as you suggested and changed the VBACKUP setting in the device configurator to 2500mV
And I applied only 2.5V to Vbackup without Vddd.

The test result is the same as before with an error of 15 seconds after 1 hour.

By the way, in my system I want to separate Vddd and Vbackup as shown in the figure below.

bat.JPG

In other words, when there is no Vddd power, it continuously measures the RTC time through the battery connected to Vbackup.

I don't understand why the RTC time error is bigger when only Vbackup power is connected.

Thanks and Regards,
YS

 

0 Likes