How to do various current readings within PWMSVM01 Period Match Interrupt

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

cross mob
User8316
Level 1
Level 1
Hello,

I’m implementing a sensorless control of a PMSMachine working as generator, using the XMC4500 relax kit and PWMSVM01 DAVE 3 App. I’m planning to use a 10KHz PWM which generates a Period Match Interrupt every 100us. I’m thinking to slice the 100us in 5 time slots of 20us and do two-phase current acquisitions within each 20us slot.

My questions are:
- it is a feasible project using PWMSM01 App?
- how can I slice the 100us Period Match Interrupt?
0 Likes
2 Replies
Eric1
Employee
Employee
Hallo Rui,

To “slice” the Period interrupt you have at least two options. Either you trigger another time with the Period interrupt and configure this time in single shot mode. The interrupt from this time can trigger directly the ADC. Or you can configure the 4th slice of the CCU8 as shifted Timer to the other CCU8s. For this you choose a different period value in the init and after start you configure also 10kHz. With this solution you have a shifted trigger refer to the other CCU8s.

May when you use the center aligned mode you don’t need to vary the slice time.

We have no specific Generator Apps but the Motor control examples and Apps should be very useful. Also regarding the ADC trigger method and configuration example.

So for this you should have a lock at the Motor control Apps, e.g. PMSMFOCSL01 you can find getting started and example code at http://www.infineon.com/xmc-dev and in the left upper corner: Motor Control Application Kits.

For documentation you can also have a look at:
http://www.infineon.com/XMC4000 e.g. “Measuring currents in drive technology with microcontrollers”
http://www.infineon.com/XMC1000

Also in the find a good example in the DAVE Local Library Store (File->Import..-> DAVE Project From Local Library Store). E.g. Resolver_FOC_Motor_Example1 or Encoder_FOC_Motor_Example2. Here you can also find an example for PWMSVM01_Example1.

I guess you are already familiar with the DAVE and DAVE Apps. Nevertheless I think the Infineon mediacenter is a good resource for general information. www.infineon.com/mediacenter -> Topics-> Products-> Microcontrollers. Especial the “DAVE™ - Signal connection and Pin assignment” because you will need the signal connection to connect the Timer to the ADC.

Regards
Eric
0 Likes
User8316
Level 1
Level 1
Thank you Eric,

I have already done what I wanted using PWMSP001 at 50KHz (T=20us), manually started/stoped at each PWMSVM01 Period Match Interrupt to achieve synchronism.

Now I have another question concerning the PWMSVM01_SVM(&PWMSVM01_Handle0, Amplitude, Angle) command but I will apply another post specifically for it.
0 Likes