You are here

how make 90 seconds timer | Cypress Semiconductor

how make 90 seconds timer

Summary: 2 Replies, Latest post by danaaknight on 24 Feb 2013 04:53 AM PST
Verified Answers: 2
Last post
Log in to post new comments.
rteg's picture
8 posts

Hi ,

      how to make a 90 seconds timer ,i.e after 90 seconds it must enable a ADC, here ADC is started by Hardware triggered by the 90 seconds timer .


user_1377889's picture
9296 posts

The usual way to accomplish a long-time timer is

Setup an interrupt-generating short-time timer (like 10 to 100ms)

At each interrupt increase a counter (can be a 32-bit global var)

in main()-loop check counter for exceeding a given value



At start of time set counter to a pre-defined value

At each interrupt decrease the counter (can be a 32-bit global var)

in main()-loop check counter for expiring.


Happy times


user_14586677's picture
7646 posts

You could also use RTC derived one pulse per second interrupt, from

the TRM -


Real Time Clock

One of the major uses of the kHzECO oscillator is for RTC
implementation. The block level illustration of the RTC
implementation is shown in Figure 14-7.
The RTC timing is derived from the 32 kHz external crystal
oscillator, as shown in Figure 14-7. Therefore, for the functioning
of the RTC, the 32 kHz external crystal must be
enabled through the register SLOWCLK_X32_CR [0]. The
generated 32 kHz is divided to achieve a one pulse per second.

The register PM_TW_CFG2[4] enables one pulse per
second functionality.

By enabling the bit PM_TW_CFG2[5], the RTC generates
an interrupt every second. The interrupt is routed through
the DSI and is brought out as an interrupt. See the UDB
Array and Digital System Interconnect chapter on page 221
for more details on usage. RTC functionality is available for
use in all power modes except the Hibernate mode.

Looks like you can use this HW feature w/o having to place

RTC module. See PM_TW_CFG2 register information in

PSOC 3 register TRM.


Regards, Dana.

Log in to post new comments.