Motor Control Application Kit Getting Started with PMSM Motor Sinusoidal 3 Hall Sensor App

XMC1000 / XMC4400
Motor Control Application Kit
Getting Started 3
PMSM Motor Sinusoidal Commutation with 3 Hall Sensor App
(PMSMSINH03)
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed speed
(Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 2
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed
speed (Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 3
Motor Control Application Kit Composition
– XMC1300 only
„ To use BLDC Motor Sinusoidal Commutation with 3 Hall Sensor
as feedback, XMC1300 bootkit BMI should be configured as User
Mode (Debug) SPD0 (P0.14)
„ Switch OFF SWCLK on-board Jlink debugger.
„ After configured to SPD0, firmware is loaded into MCU via P0.14
only. P0.15 can be used as Hall 3 signal pin (ENCI-POSIF.IN2).
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 4
Motor Control Application Kit Composition
„ Hardware Setup
„ Refer to the
Motor_Control_Application_Kit_Getting_Started01_v2_0.pdf
„ Refer to slide 4, slide 5 & slide 6 (XMC1300) and slide 7
(XMC4400)
„ Please connect the Hall Sensor to X440
connector on board
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Hall Connector
Page 5
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed
speed (Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 6
Development Tool: DAVETM
„ DAVETM is a free development platform for code generation by
Infineon
„ Can be downloaded from:
† http://www.infineon.com/cms/en/product/promopages/aimmc/DAVE_3_Download.html
„ For a guide on setting up DAVETM, please refer to XMC1x00 Boot
Kit Getting Started
„ Help -> Check for DAVE Apps Updates (XMC1000)
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 7
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed
speed (Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 8
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Open DAVETM
„ Select a Workspace or use the
Default Workspace
„ Click “OK”
„ File Æ New DAVE Project
3/21/2014
Page 9
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Click “Finish”
„ Enter
“PMSM_Motor_SINH03_Example01”
as the Project Name
„ Select “DAVE CE Project” as Project Type
„ Click “Next”
„ Select “XMC1300-TO38X0200” or
“XMC4400-F100x512” Stepping AA as
the controller depending on your
hardware
3/21/2014
Page 10
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Click on “App Selection View” on
your right
3/21/2014
Page 11
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor
with fixed speed (Speed Control)
„
Look for “PMSMSINH03” under App
Selection View
„
Double click on “PMSMSINH03” in the
S/W App Connectivity View
3/21/2014
Page 12
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor
with fixed speed (Speed Control)
„ Configure PMSMSINH03 settings
† Open PMSMSINH03 UIEditor by
double-clicking or right-click->UIEditor
on the app in S/W Connectivity View
† In UIEditor, under the
Control Algorithm tab,
¬
3/21/2014
Change Control
Technique to Speed
Control
Page 13
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control) - XMC1300 only
† Control Panel tab,
¬
Use the default setting
¬
The Motor Final Speed is
expected to be 2000 rpm
† Motor Parameters tab,
¬
Change the motor
parameters if necessary
† Power Board tab,
¬
3/21/2014
Change the configuration if
necessary
Page 14
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control) – XMC4400 only
† Control Panel tab,
¬
Use the default setting
¬
The Motor Final speed is
expected to be 2000 rpm
† Motor Parameters tab,
¬
Phase to phase resistance:
1.5 Ω
¬
Phase to phase inductance:
2.1 mH
† Power Board tab,
¬
3/21/2014
Change the configuration if
necessary
Page 15
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
† Adaptive HallPattern
Detection tab,
¬
Enable Adaptive Hall
Pattern Detection setting
† ADC Group
Configuration tab,
¬
Use default setting
† Interrupts tab,
¬
3/21/2014
Use default setting
Page 16
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Label the apps instance
† Under App Dependency TreeView
¬
Right click on IO002/0 app -> Add User
Label
¬
Type U_H in the field provided
† Repeat the steps to label other apps
3/21/2014
App
Feature
IO002/0 [U_H]
High side Phase U
IO002/1 [U_L]
Low side Phase U
IO002/2 [V_H]
High side Phase V
IO002/3 [V_L]
Low side Phase V
IO002/4 [W_H]
High side Phase W
IO002/5 [W_L]
Low side Phase W
IO004/0 [Enable_Pin]
Enable Pin Gate Driver IC
IO002/6 [Trap_Pin]
Trap Pin
IO002/7 [Hall1]
Hall 1 Pin
IO002/8 [Hall2]
Hall 2 Pin
IO002/9 [Hall3]
Hall 3 Pin
IO001/0 [IAvg]
Average Current
Page 17
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control) – XMC1300 only
„ Manual Pin Assignment
† Assign Pin
¬
Click on
¬
Assign the Pins accordingly
¬
Solve and Save
¬
Close
App
IO002/0 [U_H]
IO002/1 [U_L]
IO002/2 [V_H]
IO002/3 [V_L]
IO002/4 [W_H]
IO002/5 [W_L]
Pin Number
P0.0
P0.1
P0.7
P0.6
P0.8
P0.9
IO004/0 [Enable_Pin]
IO002/6 [Trap_Pin]
IO002/7 [Hall1]
IO002/8 [Hall2]
IO002/9 [Hall3]
IO001/0 [IAvg]
P0.11
P0.12
P0.13
P1.1
P0.15
P2.4
3/21/2014
Page 18
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control) – XMC4400 only
„ Manual Pin Assignment
† Assign Pin
¬
Click on
¬
Assign the Pins accordingly
¬
Solve and Save
¬
Close
App
IO002/0 [U_H]
IO002/1 [U_L]
IO002/2 [V_H]
IO002/3 [V_L]
IO002/4 [W_H]
IO002/5 [W_L]
Pin Number
P0.5
P0.2
P0.4
P0.1
P0.3
P0.0
IO004/0 [Enable_Pin]
IO002/6 [Trap_Pin]
IO002/7 [Hall1]
IO002/8 [Hall2]
IO002/9 [Hall3]
IO001/0 [IAvg]
P1.15
P0.7
P14.7
P14.6
P14.5
P14.13
3/21/2014
Page 19
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Generate Code
† Click
„ Initialize PMSMSINH03 apps
† Go to Dave -> Generated -> src -> PMSMSINH03 >PMSMSINH03.c
† APIs are defined in PMSMSINH03.c
„ Look for the
PMSMSINH03_MotorStart() API
3/21/2014
Page 20
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Go to DAVE -> Generated -> src -> PMSMSINH03 ->
PMSMSINH03_Conf.c
† All the variables & Handles in defined in
PMSMSINH03_Conf.c
„ Start the motor by calling the API function
PMSMSINH03_MotorStart(&PMSMSINH03_Handle0) in
Main.c
Page 21
3/21/2014
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control)
„ Build project
1. Click
2. Wait for Build to finish
„ Download code
1. Click
2. First time download, double click Tasking C/C++
Debugger in Debug Configuration
3. Select Infineon Boot Kit for XMC1300 and click Debug
4. Click
3/21/2014
to run code
Page 22
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control) - XMC1300 only
„ Waveform measurement with Oscilloscope
=
„
=
×
=
×
Speed;
= frequency in Hz;
3/21/2014
= No. pole pair
= 1995 rpm
Phase W (C2)
Phase V (C4)
Phase U (C1)
„
Page 23
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
fixed speed (Speed Control) – XMC4400 only
„ Waveform measurement with Oscilloscope
„
=
„
=
×
=
×
Speed;
= frequency in Hz;
= No. pole pair
= 1928 rpm
Phase U (C1)
Phase V (C2)
Phase W (C4)
3/21/2014
Page 24
Copyright ©
Infineon
Technologies 2011.
All i ht
d
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed
speed (Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 25
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„ Follow steps in “PMSM Motor Sinusoidal Commutation 3 Hall
Sensor with fixed speed ”
† Use different project name: “PMSM_Motor_SINH03_Example02”
† Search for PMSMSINH03 app in App Selection View
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 26
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„ Configure PMSMSINH03 settings
† Open PMSMSINH03 UIEditor by
double-clicking or right-click->UIEditor
on the app in S/W Connectivity View
† In UIEditor, under the
Control Algorithm tab,
¬
Control technique – Speed
Control
¬
Set Time Out Count 10000 msec
¬
Enable Speed Control Via
POT
¬
Use the default setting
3/21/2014
Page 27
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
† In Control Algorithm
tab (continued)
¬
Click “New Instance” &
“OK”
¬
Click “New Instance” &
“OK”
3/21/2014
Page 28
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC1300 only
† Control Panel tab,
¬
By enabling Speed
Reference via POT, the
program will ignore Start
Speed & End Speed
Configuration
† Motor Parameters tab,
¬
Speed Reference varies
from 0 – 4400 rpm
¬
Use the default setting
3/21/2014
Page 29
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC4400 only
† Control Panel tab,
¬
By enabling Speed
Reference via POT, the
program will ignore Start
Speed & End Speed
Configuration
† Motor Parameters tab,
¬
Speed Reference varies
from 0- 4000 rpm
¬
Phase to phase resistance:
1.5 Ω
¬
Phase to phase inductance:
2.1 mH
3/21/2014
Page 30
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
† Power Board
Configuration tab,
¬
Use default setting
† Adaptive HallPattern
Detection tab,
¬
Enable Adaptive Hall
Pattern Detection setting
† ADC Group
Configuration tab,
¬
Use default setting
† Interrupts tab,
¬
3/21/2014
Use default setting
Page 31
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC4400 only
† Power Board tab,
¬
keep default settings.
† ADC Group
Configuration tab,
¬
IAvg (P14.13) and
POT(P14.1) do not share
the same ADC group.
¬
Enable Group B for Current
measurement.
¬
New ADC002 and
ADCCH001 are added
3/21/2014
Page 32
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„
By enabling POT measurement, 3 ADC channels are added
automatically
„ Click
, under Signal Assignment tab
„ Two possible cases (A or B) could happen, it strongly depends
DAVE3 created ADCCH001/2 or ADCCH001/1 at the first
place
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 33
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC1300 only
Case A
Case B
¬ ADCCH001/0 -> Channel A –
Average Current Measurement
¬ ADCCH001/0 -> Channel A –
Average Current Measurement
¬ ADCCH001/2 -> Channel B DC link Voltage measurement
¬ ADCCH001/1 -> Channel B DC link Voltage measurement
¬ ADCCH001/1 -> Channel C –
POT measurement
¬ ADCCH001/2 -> Channel C –
POT measurement
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 34
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT– XMC4400 only
Case A
Case B
¬ ADCCH001/2 -> Channel B –
DC link Voltage measurement
¬ ADCCH001/1 -> Channel B –
DC link Voltage Measurement
¬ ADCCH001/1 -> Channel C POT measurement
¬ ADCCH001/2 -> Channel C POT measurement
¬ ADCCH001/3 -> Channel A –
Average Current Measurement
¬ ADCCH001/3 -> Channel A –
Average Current Measurement
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 35
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„ Label the apps instance
† Under App Dependency TreeView
¬
Right click on IO002/0 app -> Add User
Label
¬
Type U_H in the field provided
† Repeat the steps as shown in the
picture
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 36
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC1300 only
Case A
Case B
App
Feature
App
Feature
IO002/0 [U_H]
High side Phase U
IO002/0 [U_H]
High side Phase U
IO002/1 [U_L]
Low side Phase U
IO002/1 [U_L]
Low side Phase U
IO002/2 [V_H]
High side Phase V
IO002/2 [V_H]
High side Phase V
IO002/3 [V_L]
Low side Phase V
IO002/3 [V_L]
Low side Phase V
IO002/4 [W_H]
High side Phase W
IO002/4 [W_H]
High side Phase W
IO002/5 [W_L]
Low side Phase W
IO002/5 [W_L]
Low side Phase W
IO004/0 [Enable_Pin]
Enable Pin Gate Driver IC
IO004/0 [Enable_Pin]
Enable Pin Gate Driver IC
IO002/6 [Trap_Pin]
Trap Pin
IO002/6 [Trap_Pin]
Trap Pin
IO002/7 [Hall1]
Hall 1 Pin
IO002/7 [Hall1]
Hall 1 Pin
IO002/8 [Hall2]
Hall 2 Pin
IO002/8 [Hall2]
Hall 2 Pin
IO002/9 [Hall3]
Hall 3 Pin
IO002/9 [Hall3]
Hall 3 Pin
IO001/0 [IAvg]
Average Current
IO001/0 [IAvg]
Average Current
IO001/1 [POT]
POT ADC measurement
IO001/1 [DC_Link]
DC link Voltage
IO001/2 [DC_Link]
DC link Voltage
IO001/2 [POT]
POT ADC Measurement
¬ ADCCH001/0 -> Channel A –
Average Current Measurement
¬ ADCCH001/0 -> Channel A –
Average Current Measurement
¬ ADCCH001/2 -> Channel B DC link Voltage measurement
¬ ADCCH001/1 -> Channel B DC link Voltage measurement
¬ ADCCH001/1 -> Channel C –
POT measurement
¬ ADCCH001/2 -> Channel C –
POT measurement
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 37
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT – XMC4400 only
Case A
Case B
App
Feature
App
Feature
IO002/0 [U_H]
High side Phase U
IO002/0 [U_H]
High side Phase U
IO002/1 [U_L]
Low side Phase U
IO002/1 [U_L]
Low side Phase U
IO002/2 [V_H]
High side Phase V
IO002/2 [V_H]
High side Phase V
IO002/3 [V_L]
Low side Phase V
IO002/3 [V_L]
Low side Phase V
IO002/4 [W_H]
High side Phase W
IO002/4 [W_H]
High side Phase W
IO002/5 [W_L]
Low side Phase W
IO002/5 [W_L]
Low side Phase W
IO004/0 [Enable_Pin]
Enable Pin Gate Driver IC
IO004/0 [Enable_Pin]
Enable Pin Gate Driver IC
IO002/6 [Trap_Pin]
Trap Pin
IO002/6 [Trap_Pin]
Trap Pin
IO002/7 [Hall1]
Hall 1 Pin
IO002/7 [Hall1]
Hall 1 Pin
IO002/8 [Hall2]
Hall 2 Pin
IO002/8 [Hall2]
Hall 2 Pin
IO002/9 [Hall3]
Hall 3 Pin
IO002/9 [Hall3]
Hall 3 Pin
IO001/0 [not_used]
Not Used
IO001/0 [not_used]
Average Current
IO001/1 [POT]
POT ADC measurement
IO001/1 [DC_link]
DC link Voltage
IO001/2 [DC_link]
DC link Voltage
IO001/2 [POT]
POT ADC Measurement
IO001/3 [IAvg]
Average Current
IO001/3 [IAvg]
Average Current
¬ ADCCH001/2 -> Channel C –
DC link Voltage Measurement
¬ ADCCH001/1 -> Channel B –
DC link Voltage Measurement
¬ ADCCH001/1 -> Channel B POT measurement
¬ ADCCH001/2 -> Channel C POT Measurement
¬ ADCCH001/3 -> Channel A –
Average Current
¬ ADCCH001/3 -> Channel A –
Average Current
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 38
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC1300 only
„ Manual Pin Assignment
† Click on
, assign the pin accordingly
Case A
Case B
App
Pin Number
App
Pin Number
IO002/0 [U_H]
P0.0
IO002/0 [U_H]
P0.0
IO002/1 [U_L]
P0.1
IO002/1 [U_L]
P0.1
IO002/2 [V_H]
P0.7
IO002/2 [V_H]
P0.7
IO002/3 [V_L]
P0.6
IO002/3 [V_L]
P0.6
IO002/4 [W_H]
P0.8
IO002/4 [W_H]
P0.8
IO002/5 [W_L]
P0.9
IO002/5 [W_L]
P0.9
IO004/0 [Enable_Pin]
P0.11
IO004/0 [Enable_Pin]
P0.11
IO002/6 [Trap_Pin]
P0.12
IO002/6 [Trap_Pin]
P0.12
IO002/7 [Hall1]
P0.13
IO002/7 [Hall1]
P0.13
IO002/8 [Hall2]
P1.1
IO002/8 [Hall2]
P1.1
IO002/9 [Hall3]
P0.15
IO002/9 [Hall3]
P0.15
IO001/0 [IAvg]
P2.4
IO001/0 [IAvg]
P2.4
IO001/1 [POT]
P2.5
IO001/1 [DC_Link]
P2.3
IO001/2 [DC_Link]
P2.3
IO001/2 [POT]
P2.5
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 39
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT – XMC4400 only
„ Manual Pin Assignment
† Click on
, assign the pin accordingly
Case A
Case B
App
Pin Number
App
Pin Number
IO002/0 [U_H]
P0.5
IO002/0 [U_H]
P0.5
IO002/1 [U_L]
P0.2
IO002/1 [U_L]
P0.2
IO002/2 [V_H]
P0.4
IO002/2 [V_H]
P0.4
IO002/3 [V_L]
P0.1
IO002/3 [V_L]
P0.1
IO002/4 [W_H]
P0.3
IO002/4 [W_H]
P0.3
IO002/5 [W_L]
P0.0
IO002/5 [W_L]
P0.0
IO004/0 [Enable_Pin]
P1.15
IO004/0 [Enable_Pin]
P1.15
IO002/6 [Trap_Pin]
P0.7
IO002/6 [Trap_Pin]
P0.7
IO002/7 [Hall1]
P14.7
IO002/7 [Hall1]
P14.7
IO002/8 [Hall2]
P14.6
IO002/8 [Hall2]
P14.6
IO002/9 [Hall3]
P14.5
IO002/9 [Hall3]
P14.5
IO001/0 [not_used]
-
IO001/0 [not_used]
-
IO001/1 [POT]
P14.1
IO001/1 [DC_link]
P14.2
IO001/2 [DC_Link]
P14.2
IO001/2 [POT]
P14.1
IO001/3 [IAvg]
P14.13
IO001/3 [IAvg]
P14.13
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 40
PMSM Motor Sinusoidal Commutation 3 Hall Sensor
with adjustable speed via POT
„ Click Solve and Save, Click Close
„ Generate Code
† Click
„ Initialize BLDCBCH03 apps
† Go to Dave -> Generated -> src ->PMSMSINH03 >PMSMSINH03.c
† APIs are defined in PMSMSINH03.c
„ Look for the
PMSMSINH03_MotorStart() API
3/21/2014
Page 41
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„ Go to DAVE -> Generated -> src ->PMSMSINH03 ->
PMSMSINH03_Conf.c
† All the variables & Handles is defined in
PMSMSINH03_Conf.c
„ Start the motor by calling the API function Call
PMSMSINH03_MotorStart(&PMSMSINH03_Handle0) in
Main.c
Page 42
3/21/2014
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„ Build project
1. Click
2. Wait for Build to finish
„ Download code
1. Click
2. First time download, double click Tasking C/C++
Debugger in Debug Configuration
3. Select Infineon Boot Kit for XMC1300 and click Debug
4. Click
3/21/2014
to run code
Page 43
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT - XMC1300 only
„ Adjust your POT to change the reference speed
=
„
=
×
×
=
Speed;
= frequency in Hz;
3/21/2014
= No. pole pair
= 4455 rpm
Phase W (C2)
Phase V (C4)
Phase U (C1)
„
Page 44
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT – XMC4400 only
„ Waveform measurement with Oscilloscope
„
=
„
=
×
=
×
Speed;
= frequency in Hz;
= No. pole pair
= 4050 rpm
Phase U (C1)
Phase V (C2)
Phase W (C4)
3/21/2014
Page 45
Copyright ©
Infineon
Technologies 2011.
All i ht
d
PMSM Motor Sinusoidal Commutation 3 Hall Sensor with
adjustable speed via POT
„ Set the Speed reference to 0 rpm
via POT
„ Timeout occurs after 10000 msec
3/21/2014
Page 46
Copyright ©
Infineon
Technologies 2011.
All i ht
d
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed
speed (Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 47
Additional Example Projects Download
„ Download additional Example Projects via DAVETM library store
† Help Æ Install DAVE Example Library
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 48
Additional Example Projects Download
† Select DAVE Project Library Manager in the drop-down menu
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 49
Additional Example Projects Download
† Select Examples in the Libraries window and click Next
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 50
Additional Example Projects Download
† Accept terms of the license agreement and click Finish
† DAVE Example Projects are installed
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 51
Import Example Projects Download
„ Download Example Projects from the web
http://www.infineon.com/cms/en/product/promopages/aimmc/DAVE_3_Support_Portal/DAVE_Example_Project_Download.html
† Download the project zip file
† Open DAVE™ and go to File Æ Import Æ Infineon Æ DAVE
Project
† Check “Select Archive File”
† Browse to the downloaded DAVE project zip file
† Press “Open”
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 52
Contents
„ Motor Control Application Kit Composition
„ Getting Started
† Development Tool: DAVETM
† Example Project with PMSM Motor
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with fixed
speed (Speed Control)
(PMSM_Motor_SINH03_Example01_XMC13.zip)
(PMSM_Motor_SINH03_Example01_XMC44.zip)
¬ PMSM Motor Sinusoidal Commutation 3 Hall Sensor with adjustable
speed via POT (Time out & Speed Control)
(PMSM_Motor_SINH03_Example02_XMC13.zip)
(PMSM_Motor_SINH03_Example02_XMC44.zip)
„ Additional Example Projects Download
„ Help Contents
3/21/2014
Page 53
Copyright ©
Infineon
Technologies 2011.
All i ht
d
Help Content
„ Go to Help -> Help Contents
„ Look into DAVE Apps -> Expand
topics -> click on PMSMSINH03
(latest version)
„ Click on PMSMSINH03 App ->
Overview
3/21/2014
Copyright © Infineon Technologies 2011. All rights reserved.
Page 54