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

cross mob
User14604
Level 4
Level 4
First solution authored
Hello!

I'm trying to get my head around quadrature decoder of XMC4x00 series to count the steps of a rotary encoder. What I've found out so far ... please correct me if wrong ...

- XMC4300 does not have POSIF, therefore there's no chance to read a rotary encoder (except high-frequency polling of general purposes I/Os).
- POSIF reads the input signals A and B, which are then provided as step/direction signals to a CCU4/CC8 slice to be counted by it.
- There's a ENCODER_POSIF application (for XMC4700 and others), which allows me to select PHASE A and PHASE B input pins.

Now my questions:
1. How to connect the POSIF output signals (STEP and DIRECTION) to a CCU4 to be able to count?
2. Is there a complete example? ENCODER_POSIF seems to have died half way to completion.

Best regards,
Ernie
0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins
Hi Ernie,

Check the following thread on POSIF peripheral and how CCU4 is used for position tracking, revolution tracking, counting the number of ticks/period clock and capturing velocity based on time within a certain number of ticks.
https://www.infineonforums.com/threads/3540-XMClib-POSIF-as-Quadrature-encoder-example

I am attaching the project in this thread too.



Refer to the "Port I/O Function Table" present in the Reference Manual of the XMC device to determine the valid GPIO connections to POSIF module.
Also, refer to the "Interconnects" section of CCU4 chapter in the Reference Manual to determine the valid connections between CCU4 block and POSIF module.
eg: Table 22-14 of XMC4500 Reference Manual shows the mapping of CCU40 - CC40 inputs to the POSIF outputs.


Regards,
Nikhil

View solution in original post

0 Likes
4 Replies
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins
Hi Ernie,

Yes, XMC4300 has no support for POSIF peripheral.
XMC 4500, 4700 and 4800 have POSIF support.

Refer to the POSIF AppNote (https://www.infineon.com/dgdl/Infineon-POSIF-XMC1000_XMC4000-AP32289-AN-v01_00-EN.pdf?fileId=5546d46...) for details about quadrature decoder.

I shall update the thread regarding other queries.

Regards,
Nikhil
0 Likes
rst
Level 3
Level 3
First solution authored Welcome!
ErnieT wrote:
XMC4300 does not have POSIF, therefore there's no chance to read a rotary encoder (except high-frequency polling of general purposes I/Os).

Not necessary. It is possibility to attach signals A/B to the inputs of the CCU-s (working in the capture mode). And work via interrupts (when the state of A/B changes).
0 Likes
lock attach
Attachments are accessible only for community members.
ncbs
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 sign-ins
Hi Ernie,

Check the following thread on POSIF peripheral and how CCU4 is used for position tracking, revolution tracking, counting the number of ticks/period clock and capturing velocity based on time within a certain number of ticks.
https://www.infineonforums.com/threads/3540-XMClib-POSIF-as-Quadrature-encoder-example

I am attaching the project in this thread too.



Refer to the "Port I/O Function Table" present in the Reference Manual of the XMC device to determine the valid GPIO connections to POSIF module.
Also, refer to the "Interconnects" section of CCU4 chapter in the Reference Manual to determine the valid connections between CCU4 block and POSIF module.
eg: Table 22-14 of XMC4500 Reference Manual shows the mapping of CCU40 - CC40 inputs to the POSIF outputs.


Regards,
Nikhil
0 Likes
User14604
Level 4
Level 4
First solution authored
Thanks a lot for those links, Nikhil!
0 Likes