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

PSoC™ 6 SDK Forum Discussions

Level 1
Level 1

Hi I'm a newbie to the Psoc6 and I am trying to set up a counter that will count transitions from a GPIO pin.  I need a 32 bit up counter.  I have the counter  partially running, but have some questions:

1) I'm issuing a reload command using:

Cy_TCPWM_TriggerReloadOrIndex(tcpwm_1_cnt_0_HW, tcpwm_1_cnt_0_NUM); 

When I read the count after this command, it does not change.  However, if I create another

count pulse on the GPIO pin, the counter starts over.  I would have expected to read 0 from

the counter after the reload and not need another count pulse.


2) I am using a 062-4343W kit for prototyping and set the counter up using the device configurator.

In the configurator, looking at the Timer, counter setup there are a very limited number of GPIO pins

that can be used as a count signal.  Is this a limitation of the toolset/kit or a limitation

of the signal routing available in the Psoc6 used in this kit? Is there another way to set this up?  

3) In working around #2, I set attempted to cascade two 16 bit counters to make the 32 bit

counter I need.  I set the count signal for the second timer to be the overflow event

from the first counter.  The first counter overflows, however, I'm not getting the second

counter to increment.  Any suggestions?

Do you have any code samples showing cascading the counters?

2 Replies
50 likes received 250 sign-ins 250 replies posted


Can you share your project so that we can debug at our end and let you know.




OK, I have attached a sample.