xmc1000 / xmc4400 motor control application...
TRANSCRIPT
XMC1000 / XMC4400Motor Control Application KitGetting Started 2BLDC Motor Block Commutation with 3 Hall Sensor App
(BLDCBCH03)
3/21/2014 Page 2Copyright © Infineon Technologies 2011. All rights reserved.
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Speed Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
3/21/2014 Page 3Copyright © Infineon Technologies 2011. All rights reserved.
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Speed Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
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)
3/21/2014 Copyright © Infineon Technologies 2011. All rights reserved. Page 4
Hall ConnectorPlease connect the Hall Sensor to X440connector on board
Motor Control Application Kit Composition– XMC1300 only
To use BLDC Motor Block Commutation with 3 Hall Sensor asfeedback, XMC1300 bootkit BMI should be configured as User Mode (Debug) SPD0 (P0.14)
3/21/2014 Copyright © Infineon Technologies 2011. All rights reserved. Page 5
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 Page 6Copyright © Infineon Technologies 2011. All rights reserved.
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Speed Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
3/21/2014
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/aim-mc/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)
Copyright © Infineon Technologies 2011. All rights reserved. Page 7
3/21/2014 Page 8Copyright © Infineon Technologies 2011. All rights reserved.
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Speed Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
3/21/2014 Page 9
Copyright © Infineon
Technologies 2011. All i ht d
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
Open DAVETM
Select a Workspace or use the Default Workspace
Click “OK”
File New DAVE Project
3/21/2014
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
Enter “BLDC_Motor_BCH03_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
Click “Finish”
Copyright © Infineon
Technologies 2011. All i ht d
Page 10
3/21/2014 Page 11
Copyright © Infineon
Technologies 2011. All i ht d
Click on “App Selection View” on your right
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 12
Copyright © Infineon
Technologies 2011. All i ht d
Look for “BLDCBCH03” under App Selection View
Double click on “BLDCBCH03” in the S/W App Connectivity View
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 13Copyright © Infineon Technologies 2011. All rights reserved.
Configure BLDCBCH03 settings
Open BLDCBCH03 UIEditor by double-clicking or right-click->UIEditoron the app in S/W Connectivity View
In UIEditor, under the Control Algorithm tab,
¬ Change Control Technique to Speed Control
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 14Copyright © Infineon Technologies 2011. All rights reserved.
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,
¬ Change the configuration if necessary
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control) - XMC1300 only
3/21/2014 Page 15Copyright © Infineon Technologies 2011. All rights reserved.
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,
¬ Change the configuration if necessary
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control) – XMC4400 only
3/21/2014 Page 16Copyright © Infineon Technologies 2011. All rights reserved.
Adaptive HallPatternDetection tab,
¬ Enable Adaptive Hall Pattern Detection setting
ADC Group Configuration tab,
¬ Use default setting
Interrupts tab,
¬ Use default setting
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 17Copyright © Infineon Technologies 2011. All rights reserved.
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 appsApp 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
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 18Copyright © Infineon Technologies 2011. All rights reserved.
Manual Pin Assignment
Assign Pin
¬ Click on
¬ Assign the Pins accordingly
¬ Solve and Save
¬ CloseApp Pin Number
IO002/0 [U_H] P0.0IO002/1 [U_L] P0.1IO002/2 [V_H] P0.7IO002/3 [V_L] P0.6IO002/4 [W_H] P0.8IO002/5 [W_L] P0.9
IO004/0 [Enable_Pin] P0.11IO002/6 [Trap_Pin] P0.12
IO002/7 [Hall1] P0.13IO002/8 [Hall2] P1.1IO002/9 [Hall3] P0.15IO001/0 [IAvg] P2.4
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control) – XMC1300 only
3/21/2014 Page 19Copyright © Infineon Technologies 2011. All rights reserved.
Manual Pin Assignment
Assign Pin
¬ Click on
¬ Assign the Pins accordingly
¬ Solve and Save
¬ CloseApp Pin Number
IO002/0 [U_H] P0.5IO002/1 [U_L] P0.2IO002/2 [V_H] P0.4IO002/3 [V_L] P0.1IO002/4 [W_H] P0.3IO002/5 [W_L] P0.0
IO004/0 [Enable_Pin] P1.15IO002/6 [Trap_Pin] P0.7
IO002/7 [Hall1] P14.7IO002/8 [Hall2] P14.6IO002/9 [Hall3] P14.5IO001/0 [IAvg] P14.13
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control) – XMC4400 only
3/21/2014 Page 20Copyright © Infineon Technologies 2011. All rights reserved.
Generate Code
Click
Initialize BLDCBCH03 apps
Go to Dave -> Generated -> src -> BLDCBCH03 ->BLDCBCH03.c
APIs are defined in BLDCBCH03.c
Look for the BLDCBCH03_MotorStart() API
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014Page 21
Copyright © Infineon Technologies 2011. All rights reserved.
Start the motor by calling the API function BLDCBCH03_MotorStart(&BLDCBCH03_Handle0) in Main.c
Go to DAVE -> Generated -> src -> BLDCBCH03 -> BLDCBCH03_Conf.c
All the variables & Handles is defined in BLDCBCH03_Conf.c
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 22Copyright © Infineon Technologies 2011. All rights reserved.
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 to run code
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control)
3/21/2014 Page 23Copyright © Infineon Technologies 2011. All rights reserved.
Waveform measurement with Oscilloscope= × = Speed; = frequency in Hz; = No. pole pair= × = 1995 rpm
Phas
e W
(C2)
Phas
e V (
C4)
Phas
e U
(C1)
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control) – XMC1300 only
3/21/2014
BLDC Motor Block Commutation 3 Hall Sensor with fixedspeed (Speed Control) – XMC4400 only
Waveform measurement with Oscilloscope= × = Speed; = frequency in Hz; = No. pole pair= × = 1995 rpm
Phase V (C2)Phase W (C4)
Phase U (C1)
Copyright © Infineon Technologies 2011. All rights reserved. Page 24
3/21/2014 Page 25Copyright © Infineon Technologies 2011. All rights reserved.
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Speed Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
3/21/2014
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
Follow steps in “BLDC Motor Block Commutation 3 Hall Sensor with fixed speed”
Use different project name: “BLDC_Motor_BCH03_Example02”
Search for BLDCBCH03 app in App Selection View
Copyright © Infineon Technologies 2011. All rights reserved. Page 26
3/21/2014 Page 27
Copyright © Infineon
Technologies 2011. All i ht d
Configure BLDCBCH03 settings
Open BLDCBCH03 UIEditor by double-clicking or right-click->UIEditoron 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
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014 Page 28
Copyright © Infineon
Technologies 2011. All i ht d
In Control Algorithm tab (continued)
¬ Click “New Instance” & “OK”
¬ Click “New Instance” & “OK”
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014 Page 29
Copyright © Infineon
Technologies 2011. All i ht d
Control Panel tab,
¬ By enabling Speed Reference via POT, the program will ignore Start Speed & End Speed Configuration
Motor Parameters tab,
¬ Keep the default setting
¬ Speed Reference varies from 0 – 4400 rpm
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT – XMC1300 only
3/21/2014 Page 30
Copyright © Infineon
Technologies 2011. All i ht d
Control Panel tab,¬ By enabling Speed
Reference via POT, the program will ignore Start Speed & End Speed Configuration
Motor Parameters tab,¬ Phase to phase resistance :
1.5 Ω
¬ Phase to phase Inductance : 2.1 mH
¬ Speed Reference varies from 0- 4000 rpm
¬ Both resistance and inductance are converted value
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT - XMC4400 only
3/21/2014 Page 31
Copyright © Infineon
Technologies 2011. All i ht d
Power Board Configuration tab,
¬ Use default setting
Adaptive HallPatternDetection tab,
¬ Enable Adaptive Hall Pattern Detection setting
ADC Group Configuration tab,
¬ Use default setting
Interrupts tab,
¬ Use default setting
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014
Copyright © Infineon
Technologies 2011. All i ht d
Page 32
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
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT - XMC4400 only
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
By enabling POT measurement, 3 ADC channels are added automatically
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014
¬ ADCCH001/0 -> Channel A –Average Current Measurement
¬ ADCCH001/2 -> Channel B -DC link Voltage measurement
¬ ADCCH001/1 -> Channel C –POT measurement
Copyright © Infineon Technologies 2011. All rights reserved. Page 34
Case A Case B
¬ ADCCH001/0 -> Channel A –Average Current Measurement
¬ ADCCH001/1 -> Channel B -DC link Voltage measurement
¬ ADCCH001/2 -> Channel C –POT measurement
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT - XMC1300 only
3/21/2014
¬ ADCCH001/2 -> Channel B –DC link Voltage measurement
¬ ADCCH001/1 -> Channel C -POT measurement
¬ ADCCH001/3 -> Channel A –Average Current Measurement
Copyright © Infineon Technologies 2011. All rights reserved. Page 35
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT – XMC4400 only
Case A Case B
¬ ADCCH001/1 -> Channel B –DC link Voltage Measurement
¬ ADCCH001/2 -> Channel C -POT measurement
¬ ADCCH001/3 -> Channel A –Average Current Measurement
3/21/2014
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
Copyright © Infineon Technologies 2011. All rights reserved. Page 36
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014
¬ ADCCH001/0 -> Channel A –Average Current Measurement
¬ ADCCH001/2 -> Channel B -DC link Voltage measurement
¬ ADCCH001/1 -> Channel C –POT measurement
Copyright © Infineon Technologies 2011. All rights reserved. Page 37
Case A Case B
¬ ADCCH001/0 -> Channel A –Average Current Measurement
¬ ADCCH001/1 -> Channel B -DC link Voltage measurement
¬ ADCCH001/2 -> Channel C –POT measurement
App FeatureIO002/0 [U_H] High side Phase UIO002/1 [U_L] Low side Phase UIO002/2 [V_H] High side Phase VIO002/3 [V_L] Low side Phase VIO002/4 [W_H] High side Phase WIO002/5 [W_L] Low side Phase W
IO004/0 [Enable_Pin] Enable Pin Gate Driver ICIO002/6 [Trap_Pin] Trap Pin
IO002/7 [Hall1] Hall 1 PinIO002/8 [Hall2] Hall 2 PinIO002/9 [Hall3] Hall 3 PinIO001/0 [IAvg] Average CurrentIO001/1 [POT] POT ADC measurement
IO001/2 [DC_Link] DC link Voltage
App FeatureIO002/0 [U_H] High side Phase UIO002/1 [U_L] Low side Phase UIO002/2 [V_H] High side Phase VIO002/3 [V_L] Low side Phase VIO002/4 [W_H] High side Phase WIO002/5 [W_L] Low side Phase W
IO004/0 [Enable_Pin] Enable Pin Gate Driver ICIO002/6 [Trap_Pin] Trap Pin
IO002/7 [Hall1] Hall 1 PinIO002/8 [Hall2] Hall 2 PinIO002/9 [Hall3] Hall 3 PinIO001/0 [IAvg] Average Current
IO001/1 [DC_Link] DC link VoltageIO001/2 [POT] POT ADC Measurement
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT - XMC1300 only
3/21/2014
¬ ADCCH001/2 -> Channel C –DC link Voltage Measurement
¬ ADCCH001/1 -> Channel B -POT measurement
¬ ADCCH001/3 -> Channel A –Average Current
Copyright © Infineon Technologies 2011. All rights reserved. Page 38
Case A Case B
¬ ADCCH001/1 -> Channel B –DC link Voltage Measurement
¬ ADCCH001/2 -> Channel C -POT Measurement
¬ ADCCH001/3 -> Channel A –Average Current
App FeatureIO002/0 [U_H] High side Phase UIO002/1 [U_L] Low side Phase UIO002/2 [V_H] High side Phase VIO002/3 [V_L] Low side Phase VIO002/4 [W_H] High side Phase WIO002/5 [W_L] Low side Phase W
IO004/0 [Enable_Pin] Enable Pin Gate Driver ICIO002/6 [Trap_Pin] Trap Pin
IO002/7 [Hall1] Hall 1 PinIO002/8 [Hall2] Hall 2 PinIO002/9 [Hall3] Hall 3 Pin
IO001/0 [not_used] Not UsedIO001/1 [POT] POT ADC measurement
IO001/2 [DC_link] DC link VoltageIO001/3 [IAvg] Average Current
App FeatureIO002/0 [U_H] High side Phase UIO002/1 [U_L] Low side Phase UIO002/2 [V_H] High side Phase VIO002/3 [V_L] Low side Phase VIO002/4 [W_H] High side Phase WIO002/5 [W_L] Low side Phase W
IO004/0 [Enable_Pin] Enable Pin Gate Driver ICIO002/6 [Trap_Pin] Trap Pin
IO002/7 [Hall1] Hall 1 PinIO002/8 [Hall2] Hall 2 PinIO002/9 [Hall3] Hall 3 Pin
IO001/0 [not_used] Average CurrentIO001/1 [DC_link] DC link Voltage
IO001/2 [POT] POT ADC MeasurementIO001/3 [IAvg] Average Current
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT – XMC4400 only
3/21/2014 Copyright © Infineon Technologies 2011. All rights reserved. Page 39
Manual Pin Assignment
Click on , assign the pin accordingly
Case A Case BApp Pin Number
IO002/0 [U_H] P0.0
IO002/1 [U_L] P0.1
IO002/2 [V_H] P0.7
IO002/3 [V_L] P0.6
IO002/4 [W_H] P0.8
IO002/5 [W_L] P0.9
IO004/0 [Enable_Pin] P0.11
IO002/6 [Trap_Pin] P0.12
IO002/7 [Hall1] P0.13
IO002/8 [Hall2] P1.1
IO002/9 [Hall3] P0.15
IO001/0 [IAvg] P2.4
IO001/1 [POT] P2.5
IO001/2 [DC_Link] P2.3
App Pin Number
IO002/0 [U_H] P0.0
IO002/1 [U_L] P0.1
IO002/2 [V_H] P0.7
IO002/3 [V_L] P0.6
IO002/4 [W_H] P0.8
IO002/5 [W_L] P0.9
IO004/0 [Enable_Pin] P0.11
IO002/6 [Trap_Pin] P0.12
IO002/7 [Hall1] P0.13
IO002/8 [Hall2] P1.1
IO002/9 [Hall3] P0.15
IO001/0 [IAvg] P2.4
IO001/1 [DC_Link] P2.3
IO001/2 [POT] P2.5
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT - XMC1300 only
3/21/2014 Copyright © Infineon Technologies 2011. All rights reserved. Page 40
Manual Pin Assignment
Click on , assign the pin accordingly
Case A Case BApp Pin Number
IO002/0 [U_H] P0.5
IO002/1 [U_L] P0.2
IO002/2 [V_H] P0.4
IO002/3 [V_L] P0.1
IO002/4 [W_H] P0.3
IO002/5 [W_L] P0.0
IO004/0 [Enable_Pin] P1.15
IO002/6 [Trap_Pin] P0.7
IO002/7 [Hall1] P14.7
IO002/8 [Hall2] P14.6
IO002/9 [Hall3] P14.5
IO001/0 [not_used] -
IO001/1 [POT] P14.1
IO001/2 [DC_Link] P14.2
IO001/3 [IAvg] P14.13
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT – XMC4400 only
App Pin Number
IO002/0 [U_H] P0.5
IO002/1 [U_L] P0.2
IO002/2 [V_H] P0.4
IO002/3 [V_L] P0.1
IO002/4 [W_H] P0.3
IO002/5 [W_L] P0.0
IO004/0 [Enable_Pin] P1.15
IO002/6 [Trap_Pin] P0.7
IO002/7 [Hall1] P14.7
IO002/8 [Hall2] P14.6
IO002/9 [Hall3] P14.5
IO001/0 [not_used] -
IO001/1 [DC_link] P14.2
IO001/2 [POT] P14.1
IO001/3 [IAvg] P14.13
3/21/2014 Page 41
Copyright © Infineon
Technologies 2011. All i ht d
Generate Code
Click
Initialize BLDCBCH03 apps
Go to Dave -> Generated -> src -> BLDCBCH03 ->BLDCBCH03.cAPIs are defined in BLDCBCH03.c
Look for the BLDCBCH03_MotorStart() API
Click Solve and Save, Click Close
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014Page 42 Copyright ©
Infineon Technologies 2011. All i ht d
Start the motor by calling the API function BLDCBCH03_MotorStart(&BLDCBCH03_Handle0) in Main.c
Go to DAVE -> Generated -> src -> BLDCBCH03 -> BLDCBCH03_Conf.c
All the variables & Handles is defined in BLDCBCH03_Conf.c
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014 Page 43
Copyright © Infineon
Technologies 2011. All i ht d
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 to run code
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT
3/21/2014 Page 44
Copyright © Infineon
Technologies 2011. All i ht d
Adjust your POT to change the maximum speed reference = × = Speed; = frequency in Hz; = No. pole pair= × = 4320 rpm
Phas
e W
(C2)
Phas
e V (
C4)
Phas
e U
(C1)
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT - XMC1300 only
3/21/2014
BLDC Motor Block Commutation 3 Hall Sensor withadjustable speed via POT – XMC4400 only
Waveform measurement with Oscilloscope= × = Speed; = frequency in Hz; = No. pole pair= × = 4050 rpm
Phase V (C2)Phase W (C4)
Phase U (C1)
Copyright © Infineon
Technologies 2011. All i ht d
Page 45
3/21/2014 Page 46
Copyright © Infineon
Technologies 2011. All i ht d
Turn the POT to min to set the speed reference to 0 rpm.
Timeout occurs after 10000 msec
BLDC Motor Block Commutation 3 Hall Sensor with POT(Time Out)
3/21/2014 Page 47Copyright © Infineon Technologies 2011. All rights reserved.
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Speed Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
Download Additional Example Projects via DAVETM library store
Help Install DAVE Example Library
3/21/2014 Page 48Copyright © Infineon Technologies 2011. All rights reserved.
Additional Example Projects Download
Select DAVE Project Library Manager in the drop-down menu
3/21/2014 Page 49Copyright © Infineon Technologies 2011. All rights reserved.
Additional Example Projects Download
Select Additional Examples in the Libraries window and click Next
3/21/2014 Page 50Copyright © Infineon Technologies 2011. All rights reserved.
Additional Example Projects Download
Accept terms of the license agreement and click Finish
DAVE Example Projects are installed
3/21/2014 Page 51Copyright © Infineon Technologies 2011. All rights reserved.
Additional Example Projects Download
Download Example Projects from the webhttp://www.infineon.com/cms/en/product/promopages/aim-
mc/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 Page 52Copyright © Infineon Technologies 2011. All rights reserved.
Import Example Projects
3/21/2014 Page 53
Copyright © Infineon
Technologies 2011. All i ht d
ContentsMotor Control Application Kit Composition
Getting Started
Development Tool: DAVETM
Example Project with PMSM Motor
¬ BLDC Motor Block Commutation 3 Hall Sensor with fixed speed(Voltage Control)
(BLDC_Motor_BCH03_Example01_XMC13.zip)
(BLDC_Motor_BCH03_Example01_XMC44.zip)
¬ BLDC Motor Block Commutation 3 Hall Sensor with adjustablespeed via POT (Time out & Speed Control)
(BLDC_Motor_BCH03_Example02_XMC13.zip)
(BLDC_Motor_BCH03_Example02_XMC44.zip)
Additional Example Projects Download
Help Content
Go to Help -> Help Contents
Look into DAVE Apps -> Expand topics -> click on BLDCBCH03 (latest version)
Click on BLDCBCH03 App -> Overview
3/21/2014 Page 54Copyright © Infineon Technologies 2011. All rights reserved.
Help Content