Jun 23, 2021
05:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 23, 2021
05:52 AM
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
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
Solved! Go to Solution.
- Tags:
- IFX
1 Solution
Jul 15, 2021
09:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 15, 2021
09:57 PM
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
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
4 Replies
Jun 29, 2021
02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 29, 2021
02:45 AM
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
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
Jun 29, 2021
03:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 29, 2021
03:46 AM
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).
Jul 15, 2021
09:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 15, 2021
09:57 PM
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
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
Sep 06, 2021
04:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 06, 2021
04:13 AM
Thanks a lot for those links, Nikhil!