55
XMC1000 / XMC4400 Motor Control Application Kit Getting Started 2 BLDC Motor Block Commutation with 3 Hall Sensor App (BLDCBCH03)

XMC1000 / XMC4400 Motor Control Application Kit

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Page 1: XMC1000 / XMC4400 Motor Control Application Kit

XMC1000 / XMC4400Motor Control Application KitGetting Started 2BLDC Motor Block Commutation with 3 Hall Sensor App

(BLDCBCH03)

Page 2: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 3: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 4: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 5: XMC1000 / XMC4400 Motor Control Application Kit

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).

Page 6: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 7: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 8: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 9: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 10: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 11: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 12: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 13: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 14: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 15: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 16: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 17: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 18: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 19: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 20: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 21: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 22: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 23: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 24: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 25: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 26: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 27: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 28: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 29: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 30: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 31: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 32: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 33: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 34: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 35: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 36: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 37: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 38: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 39: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 40: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 41: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 42: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 43: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 44: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 45: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 46: XMC1000 / XMC4400 Motor Control Application Kit

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)

Page 47: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 48: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 49: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 50: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 51: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 52: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 53: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 54: XMC1000 / XMC4400 Motor Control Application Kit

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

Page 55: XMC1000 / XMC4400 Motor Control Application Kit