PSoC6: connecting clock to Timer Counter or Sync

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

cross mob
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Hi,

I want to connect a clock component to the count input of a Timer Counter component. When I do so, I get the error message:

Error: mpr.M0119: Invalid connection for clock "RefClock" connected to "\RefCounter:TCPWM\:count". (App=cydsfit)

(RefClock is a 1MHz clock derived from the 50MHz Clk_Peri, and RefCounter is a 32bit Timer Counter component, whose 'clock' input is connected to Clk_Peri/2 for synchronization.

I also tried to sync the 1MHz RefClock to Clk_Peri/2 using a Sync component, but I get the same error:

Error: mpr.M0119: Invalid connection for clock "RefClock" connected to "\Sync_1:genblk1[0]:INST\:in". (App=cydsfit)

How can I solve this?

0 Likes
1 Solution
NidhinM_71
Employee
Employee
25 solutions authored 10 solutions authored Welcome!

Hello,

In PSoC 6, clocks are routed separately from other digital signals. Clocks can be connected only to the clock inputs of components. If you want to connect a clock to the count input of a TCPWM, you should convert the clock into a signal, for example, using a T Flip-Flop, as shown in the  following image:

ClockToCount.PNG

That being said, there could be other, easier methods to achieve what you need without using such a circuit. Can you please give more information about the application ?

Thanks

Nidhin

View solution in original post

0 Likes
2 Replies
NidhinM_71
Employee
Employee
25 solutions authored 10 solutions authored Welcome!

Hello,

In PSoC 6, clocks are routed separately from other digital signals. Clocks can be connected only to the clock inputs of components. If you want to connect a clock to the count input of a TCPWM, you should convert the clock into a signal, for example, using a T Flip-Flop, as shown in the  following image:

ClockToCount.PNG

That being said, there could be other, easier methods to achieve what you need without using such a circuit. Can you please give more information about the application ?

Thanks

Nidhin

0 Likes

So the PSoC6 works like the PSoC4 in this regard, right? I need to look up the blog posts on its clocking system and refresh my memories.

My use case is build a reciprocal frequency counter, and the part I was working on was the reference count (which is clocked by a fixed frequency). Probably this can also be done by a PWM component, but I would need whether I can access the internal state when its stopped.

0 Likes