XMC 4500 POSIF for 9 Hall Sensors in one Motor

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

cross mob
User15863
Level 1
Level 1
I have a BLDC motor, that have inside 9 Hall Sensors. For now logic driven it is to every 50micro there is a interrupt which read all hall sensors and gets it pattern. Now I am trying to implement
POSIF for Hall Sensors, that will read all 9 Hall Sensors and return pattern. For now I have huge problem to understand how can I read all 9, when one modul can read only 3.
Also I try to understand Multi Channel Unit in Hall-Sensor Mode and how to implement it. Is Multi Channel even a solution to this problem? Can someone help me how to approach this problem
with POSIF module? In my processor XMC4500 I have 3 POSIF modules? Should I use all 3, because I have 9 Hall Sensors? Can this modules communicate between each other?
0 Likes
1 Reply
Eric1
Employee
Employee
Hello Bertoncelj,

The XMC4500 provides 2 POSIF interfaces.
Each Interface has 6 Input lines where 3 can be used simultaneously.
So the POSIF interface is designed for up to 3 Hall inputs.
I assume you require 9 HALL inputs for a very precise control at low speed or to compensate machanical:electrical rotation.

If the Hall-Event should trigger an IRQ there are some options:
The POSIF is designed to minimize the CPU load. It could be an option to still use the POSIF but reconfigure every 1/3 of rotation.
Or only connect 3 Halls and use the POSIF while high Speed.
The ERU allows up to 8 Pins to generate an interrupt simultaneously. So also here ~every Rotation a reconfiguration is required.
Another option would be to pull for the input But this will create a lot of CPU load.

In general the POSIF comparing the Input on 3 Pins against 2 target configurations. One "current" and one "next" and generate an "correct" interrupt if the "next" pattern macht the Input.
And a "wrong" Interrupt if not. (+ Autoupdate the registers). The Multichannel is generally a hardware gating of the CCU slice. This will reduce the time between hall event and new PWM pattern.

You can find more information about the POSIF in the Reference Manual and the Application Note AP32289 Position Interface (POSIF).
Additionally you can find examples in the AP32289 Position Interface (POSIF) Example zip. All this you can find at www.infineon.com/XMC4000
Another source of information are the DAVE APPs (e.g. Pin_Interrupt)

Depending on the Application the high CPU load for polling could also be outsourced by using a XMC1000 MCU.

Best Regards
Eric
0 Likes