3 Replies Latest reply on Aug 10, 2020 2:32 PM by MoTa_728816

    Timers - Achieving < 1 microsecond pulses at fixed intervals

    AlRu_4725236

      Hello,

       

      I am using a CY8CKIT-042 PSoC 4 Pioneer Kit.

      I need to be able to produce microsecond (or less) long pulses at fixed intervals. I know of the CyDelayUs() function, but it's not as accurate as I need it to be, the way I'm using it at least.

      Firing a digital output, calling CyDelayUs(1), then turning the output off produces a pulse of about 3.2 us as measured on an oscilloscope, and that's as low as I could seem to get it.

       

      I also tried using a Timer Counter component in One shot mode with a period of 10 and a clock frequency of 6 MHz. With this configuration it should count up to 10 in 1.67 us, then turn off. In code I have a digital output firing if the counter is greater than 0, and turned off otherwise. Looking at the output with an oscilloscope, I am seeing a pulse duration of exactly 2.5 us, and no matter what I do I can't get it any faster than 2.5 us. Even with a clock frequency of 12 MHz and a period of 5, which should give me a pulse of about .42 us, I still see a pulse of 2.5 us. It seems the speed is being bottlenecked by something else I am not aware of.

       

      I know the processor is capable of doing this, as I can see <1 us pulses using a PWM component with the right configuration, but I need single pulses at fixed intervals, sometimes several seconds apart.

       

      So, what is the quickest pulse I can manually achieve, and what is the proper method of doing so?

       

      Thanks