PSOC5LP real time clock

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

cross mob
AbPa_4654881
Level 3
Level 3
10 replies posted 10 questions asked 10 likes given

Hi all,

I am using CY8Ckit-059 and I need to log some data in the SD card with real-time reading using the internal PSOC RTC component. 
so the data logs will be like  

Timestamp: data1: data2: data3............................


For that Purpose, I was trying the RTC  example and printing the timestamp on the USB-UART serial monitor.

In the example code  I am trying to printing the tmpVar on the serial monitor after evey 5-10 seconds, and it is giving the same value that was assigned initially. 

tmpVar = RTC_ReadSecond();
PrintDecNumber(tmpVar);
tmpVar = RTC_ReadMinute();
PrintDecNumber(tmpVar);
tmpVar = RTC_ReadHour();
PrintDecNumber(tmpVar);

tmpVar = RTC_ReadDayOfMonth();
PrintDecNumber(tmpVar);

/* Get and print month */
tmpVar = RTC_ReadMonth();
PrintDecNumber(tmpVar);

/* Get and print year */
tmpVar = (uint8)(RTC_ReadYear() % 100u);
PrintDecNumber(tmpVar);

/* Get and print day of week */
tmpVar = RTC_currentTimeDate.DayOfWeek;
USBUART_PutChar(tmpVar + 0x30u);

can anybody please help regarding this?

If any example is available please share.

 

0 Likes
1 Solution

Hello.

Yes, you've enabled the PSoC hardware to accept an external 32.768kHz crystal.
The question is, did you install a 32.768kHz crystal to the circuit board KIT-059?
I suspect the answer is no.  And there lies the problem.

If a 32.768kHz crystal is not installed on KIT-059, enabling the External Crystal clock option doesn't do anything.  Hence, the RTC time code does not change.

You need to solder a 32.768kHz crystal onto the KIT-059 circuit board at location Y1.  The KIT-059 Guide shows a suggested crystal in the Bill Of Materials (near the end of the Guide).

I suggest you also read this other message.  Same issue.
https://community.infineon.com/t5/PSoC-4/32khz-xtal-not-stable-or-close-to-32khz-Psoc-5-kit/td-p/338...

Good luck with your project.

View solution in original post

0 Likes
5 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

KIT-059 has solder pads for the crystal for the user to install.
Did you install the crystal?

0 Likes

I am not sure what crystal are you referring to.
According to the datasheet, I need to provide a 32.768-kHz clock from an external crystal oscillator.

AbPa_4654881_0-1647451138309.png

 



0 Likes

Hello.

Yes, you've enabled the PSoC hardware to accept an external 32.768kHz crystal.
The question is, did you install a 32.768kHz crystal to the circuit board KIT-059?
I suspect the answer is no.  And there lies the problem.

If a 32.768kHz crystal is not installed on KIT-059, enabling the External Crystal clock option doesn't do anything.  Hence, the RTC time code does not change.

You need to solder a 32.768kHz crystal onto the KIT-059 circuit board at location Y1.  The KIT-059 Guide shows a suggested crystal in the Bill Of Materials (near the end of the Guide).

I suggest you also read this other message.  Same issue.
https://community.infineon.com/t5/PSoC-4/32khz-xtal-not-stable-or-close-to-32khz-Psoc-5-kit/td-p/338...

Good luck with your project.

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

AbPa,

If you don't have a watch crystal installed on the CY8CKIT-059 board across PSoC5 pins P15.2 and P15.3, may I recommend - LFXTAL009678REEL 

I've used this watch crystal quite effectively.

I solder it directly across the CY8CKIT-059 header pins for P15.2 and P15.3  The crystal pad center-to-center width is 2.4mm.  The header pin center-to-center width is 2.54mm.  This works very well.  Also, do not solder any other connections to these header pins.

Len_CONSULTRON_0-1648050872488.png

 

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Although this is not the exact solution for using the 5LP internal RTC,

previously there was a discussion about using an external RTC module.

And I posted a sample for that module there

https://community.infineon.com/t5/Code-Examples/PCF-8563-RTC-Module-sample-CY8CKIT-059/m-p/326858

Just for your information 😉

moto

0 Likes