6 Replies Latest reply on Feb 2, 2016 11:26 AM by user_1377889

    PSoC4 TCPWM QuadDec not working




      I am using the TCPWM QuadDec example project in PSoC Creator 3.3 on a CY8C4245AXI-483, but it doesn't seem to be counting. I have verified that the PSoC is recieving the quadrature inputs correctly by outputting the signals on LEDs, which flash correctly as the encoder rotates.


      This has been discussed before on the forums here and here, and the answer was to use the QuadDec_TriggerCommand() function. However, the example project I am using already uses this function, but it's still not working.


      Is this a known problem?


      Many thanks



        • 1. Re: PSoC4 TCPWM QuadDec not working

          Consider posting your project, makes life easier to troubleshoot.




          “File”                                                             Creator


          “Create Workspace Bundle”






          Regards, Dana.

          • 2. Re: PSoC4 TCPWM QuadDec not working

            Hi Dana,


            No need, just try the example that comes with PSoC Creator 3.3. It doesn't work.



            • 3. Re: PSoC4 TCPWM QuadDec not working

              I have the same problem. The UDB-based quadrature decoder works fine (but consumes too much resources)



              • 4. Re: PSoC4 TCPWM QuadDec not working

                Welcome in the forum, Jon.


                Can you specify a bit more what works and what doesn't? Best would be to additionally post your complete project, so that we all can have a look at all of your settings. To do so, use
                Creator->File->Create Workspace Bundle (minimal)
                and attach the resulting file.





                • 5. Re: PSoC4 TCPWM QuadDec not working

                  I have a simple design with two inputs from a rotating encoder with quadrature outputs connected to port P2[2] and P2[3] (conn. J2-05 and J2-06) on a CY8CKIT-042.  It is clocked by a 1MHz clock component. The QuadDec is configured as simple as possible, no index & stop inputs and no interrupt.


                  First I try to start the component, designated QDEC:


                      QDEC_TriggerCommand(QDEC_MASK, QDEC_CMD_START);  /* First tried without this */


                  Then I periodically (once a second) read the internal counter by calling  QDEC_ReadCounter(). I also looked at the counter with the debugger. But it is always stuck to 0x8000. 


                  When replacing the TCPWM-decoder by the UDB-based quadrature decoder, in a similar but 8-bit configuration, everything works fine. But now I am unable to get resources for the rest of my logic...


                  This is part of a larger project, but if helpful I may make a simplified demo. But the problem seems to be the same as others have observed.


                  Thanks, Jon

                  • 6. Re: PSoC4 TCPWM QuadDec not working

                    Consider contacting Cypress directly. On top of this page "Design Support -> Create a Support Case". You may attach your complete project, Cypress is handling that confidentially.