2 Replies Latest reply on Jan 29, 2018 3:03 PM by user_78878863

    PSoC6: connecting clock to Timer Counter or Sync

    user_78878863

      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?

        • 1. Re: PSoC6: connecting clock to Timer Counter or Sync
          nidh

          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

          • 2. Re: PSoC6: connecting clock to Timer Counter or Sync
            user_78878863

            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.