You are here

how to generate Timer | Cypress Semiconductor

how to generate Timer

Summary: 1 Reply, Latest post by Bob Marlowe on 26 Feb 2016 03:26 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
dinaline_1572371's picture
39 posts

Hi. i have a question about Timer.

compared to other program, 'PSoC Creator' used wdt mostly by creating Timer.

but I think that side effect of this program could only 3 wdt.

but I want to use such as '1sec, 1min' Timer.

here's the example


 if(!(SysTimer10ms%600)) { // 1 min
 if(!(SysTimer10ms%100)) { // 1 sec
 if(!(SysTimer10ms%10)) { //100 ms



please teach me in detail.

user_1377889's picture
9281 posts

Using the systick timer or the WDT as you showed is the usual ARM M0 way. But in PSoCs (or PRoCs) is a bit more: there are components. Open the Topdesign view and drag a Timer Counter PWM - component onto your schematic screen. You may add a new page beforehand to better overview what you do. This component together with a clock component can be used to generate a one minute timer quite easy. The output can be connected to an isr component to get interrupted. With the component's APIs you are able to control (start/stop/reset etc) the TCPWM.




Log in to post new comments.