PSoC4 TCPWM QuadDec not working

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

cross mob
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

Hi,

   

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

   

Hugo

0 Likes
6 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Consider posting your project, makes life easier to troubleshoot.

   

 

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

 

   

 

   

Regards, Dana.

0 Likes
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

Hi Dana,

   

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

   

Hugo

0 Likes
Anonymous
Not applicable

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

   

Jon

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

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_Start(); 
    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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob

0 Likes