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

cross mob
GK1
Level 2
Level 2
10 replies posted 5 replies posted 10 sign-ins

How to implement RTC in PSoC4100S Plus - CY8C4147AZI-S475 ?

0 Likes
1 Solution
ADSW
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 25 likes received

Hello @GK1 , 

You can use PSoC creator for RTC implementation. 
by adding the RTC block into your TopDesign.cysch and configure the initial time & date

ADSW_0-1699278747642.png

Set the input clock source from Design Wide Resource > clock > edit

ADSW_2-1699279052223.png

we can use Watchdog counter ( timer0, timer1 or timer2 ) as clock. 

ADSW_1-1699278998722.png

Then generate application. 
Call the RTC_Start() function inside the main-function to start the RTC

If you want to run in Modustoolbox, need to porting it from PSoC creator since PSoC4100s plus will use RTC API ( SW ) and need to configure the RTC to enable implement update manually from TopDesign of PSoC Creator Project.

ADSW_3-1699279371333.png

Generate the application, copy the RTC.h and RTC.c from Generated_Source then doing some modification inside the RTC.h

Configure the timer-interrupt ( WCO, WDT or Systick ) to run periodically (1 seconds ) and call the RTC_Update function inside of the timer callback function.

Warm regards
Andri



View solution in original post

1 Reply
ADSW
Moderator
Moderator
Moderator
250 sign-ins 50 solutions authored 25 likes received

Hello @GK1 , 

You can use PSoC creator for RTC implementation. 
by adding the RTC block into your TopDesign.cysch and configure the initial time & date

ADSW_0-1699278747642.png

Set the input clock source from Design Wide Resource > clock > edit

ADSW_2-1699279052223.png

we can use Watchdog counter ( timer0, timer1 or timer2 ) as clock. 

ADSW_1-1699278998722.png

Then generate application. 
Call the RTC_Start() function inside the main-function to start the RTC

If you want to run in Modustoolbox, need to porting it from PSoC creator since PSoC4100s plus will use RTC API ( SW ) and need to configure the RTC to enable implement update manually from TopDesign of PSoC Creator Project.

ADSW_3-1699279371333.png

Generate the application, copy the RTC.h and RTC.c from Generated_Source then doing some modification inside the RTC.h

Configure the timer-interrupt ( WCO, WDT or Systick ) to run periodically (1 seconds ) and call the RTC_Update function inside of the timer callback function.

Warm regards
Andri