5 Replies Latest reply on Jan 8, 2018 7:14 PM by kygrc_2308861

    External clock for a timer


      I want connect an external clock (16 MHz) to a TCPWM for better accuracy. But I can't get it right.


      I connected the external clock to Pin [0.6] and mapped it in the "configure system clock" - window to EXTCLK.
      In the same window I routed the EXTCLK to "Routed2" and was then able to configure the clock-component in the TopDesign to the existing clock "Routed2".


      I get the error:

      Pin guidance unavailable: Invalid connection for clock input "\IVC_S1_Timer:cy_m0s8_tcpwm_1\:clock"  driven from "ClockBlock:dsi_in_1". The component requires a clock from the clock block.

      I tried also another pin and configured and routed it as "DigitalSignal" with the same result.


      Is there somewhere a tutorial on how to use an external clock with PSoC 4?
      What is a "clock from the clock block"?



        • 1. Re: External clock for a timer

          A clock block  is a  clock component . This Component  can be found  in the components on the right side of the Psoc Creator window when you are in the top design.

          • 2. Re: External clock for a timer

            Thanks for your reply.
            The TCPWM is driven by a clock component. The clock component is configured to feed the external clock.
            And the confusing thing is, that the error says, the TCPWM is driven by "ClockBlock:dsi_in_1" but requires a clock from the clock block?



            • 3. Re: External clock for a timer

              Here's an example where I tried to connect an external clock to a TCPWM




              • 4. Re: External clock for a timer

                Hi Thomas,

                It will not be possible to use external clock directly to that fixed function block until it is not kept as device clock. I can suggest you 3 ways to avoid this problem,

                1. Use the UDB implementation of the the PWM. In that case you any of the GPIO as the input to the component. The external clock can be given through that pin. You may have to the the firmware code with correct API's.


                2. Use the external clock as input to the whole system. If you don't want a lower(16MHz) clock to run the system, use a 48 MHz external source,finally in the clock component you can select HFCLK and divider value to get the frequency you require.


                3. Another low cost solution is to use WCO. You can connect it externally(32.768kHz) and in the IMO you choose "Trim with" option to be WCO. You can see the accuracy changing from 2% to 0.2%.

                I hope this answer helps.

                Best Regards,

                • 5. Re: External clock for a timer

                  Where is this "trim with" option? I'm having the same problem as the OP except I want to use either the WCO (32kHz) or ECO (24MHz) to drive my counter. I need my system to run at 48 MHz though and I don't see a way to derive 48 MHz from my ECO.