Help me understand how the TCPWM works

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

cross mob
SaWa_284216
Level 4
Level 4

So I bought a load of the wrong chips I wanted CY8C4245 AXI-483 but I bought the 4125's by accident.. these have no UDB so I can't use the nice Timer..

   

I want to use the TCPWM module to create an interrupt on a timing of my choice, let's say 1HZ.

   

The timer interface makes this really easy it shows you in seconds when the interurpt with occur..

   

however the TCPWM looks really complicated it has all graphs and stuff no times.

   

I read the datasheet but can't see any examples.

   

All I want is a 1 second timer.

0 Likes
2 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Right-click on the component, click on 'find example projects', there you will find some.

   

The circuit you want is rather simple:

   
        
  • feed your timer a 1kHz signal (for simplicity, but can be different)
  •     
  • configure the terminal count to 999 (remember, its zero-based...)
  •     
  • Everything else can stay on default
  •     
  • connect an ISR to the interrupt pin
  •    
   

The the ISR will be triggered once per second (because its triggered when the timer reaches its terminal count). The graphs in the configuration dialog just show you when certain events happen in the counter cycle.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Use the Cortex Systick timer HW, integral to part -

   

 

   

    

   

          http://www.cypress.com/?app=forum&id=2492&rID=85773&source=creatorstart

   

 

   

This gets you to 100 mS, then a simple SW counter to get to 1 sec.

   

 

   

Regards, Dana.

0 Likes