Top Banner
Infineon XMC DeveloperDay Matlab ® Simulink ® on XMC October 21 th , 2015 Achim Schuette Infineon Hannover
28

Infineon XMC DeveloperDay

Dec 18, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Infineon XMC DeveloperDay

Infineon XMC DeveloperDayMatlab®Simulink® on XMC

October 21th, 2015Achim Schuette Infineon Hannover

Page 2: Infineon XMC DeveloperDay

Infineon

2

Achim SchütteInfineon Technologies AGSenior Field Application & Concept Engineer

IFAG PMM IMC ACE FAE

Tel.: +49 (0)89 234 43502Fax: +49 (0)89 234 15 43502Cell: +49 (0)151 649 [email protected] Plaza 1130539 Hannover

1995: Studium der Automatisierungstechnik FH Hannover & WRTC (Irland)

1995...2013: Lenze, Entwicklung Antriebs- und Automatisierungssysteme

seit Mai 2013: Infineon

Page 3: Infineon XMC DeveloperDay

Agenda

Introduction to Simulink 10min

XMC Embedded Coder Library 5min

How to get best performance – CMSIS DSP-Lib 5min

Dryrun Embedded Coder Library 15min

Discussions 5min

1

2

3

4

5

3

Page 4: Infineon XMC DeveloperDay

Agenda

Introduction to Simulink

XMC Embedded Coder Library

How to get best performance – CMSIS DSP-Lib

Dryrun Embedded Coder Library

Discussions

1

2

3

4

5

4

Page 5: Infineon XMC DeveloperDay

Introduction to Simulink

› Graphical modelling of dynamic systems by signal flow graphs

› Simulink is an addition to MATLAB (Toolbox)

› Simulink Additions: Blocksets, SimPower-Systems, SimMechanics, Embedded Coder

› Embedded Coder allows Code generation for a real applicagtion target system i.e. XMC4500

5

Page 6: Infineon XMC DeveloperDay

Introduction to Simulink Blocksets

6

Sources Signal Routing Continuous User defined

Page 7: Infineon XMC DeveloperDay

Introduction to SimulinkSimulation of a PMSM Motor

7

Simulink Model of a PMSM Motor

Math-Model of a PMSM Motor

Page 8: Infineon XMC DeveloperDay

Introduction to Simulink XMC Simulink support

Typical Matlab environment Typical Matlab workflow

Target HardwareDAVE

Include generatedC-Code into project

(DAVE, Keil,…)*.c*.h

8

3rd Parties

Page 9: Infineon XMC DeveloperDay

Introduction to Simulink XMC Simulink support

Typical Matlab environment Typical Matlab workflow

Target HardwareDAVE

Include generatedC-Code into project

(DAVE, Keil,…)*.c*.h

ADCPWM Timer

9

Embedded Coder Library 3rd Parties

Page 10: Infineon XMC DeveloperDay

Introduction to Simulink XMC Simulink support

Typical Matlab environment Typical Matlab workflow

Target Hardware

DAVE

Include generatedC-Code into project

(DAVE, Keil,…)

If using DAVEyou can addApps to theMatlab output

*.c*.h

ADCPWM Timer

10

Embedded Coder Library

Page 11: Infineon XMC DeveloperDay

Agenda

Introduction to Simulink

XMC Embedded Coder Library

How to get best performance – CMSIS DSP-Lib

Dryrun Embedded Coder Library

Discussions

1

2

3

4

5

11

Page 12: Infineon XMC DeveloperDay

XMC Embedded Coder Library

12

Device lib

Peripherals lib

CORDIC lib

Advancedconfigurations

Advancedconfigurations

Workflow for

Model-Based DesignMotor Control applications

Power Conversion applicationsReal-time applications

› Automatic Code Generation

› Automatic objectGeneration

› Easy code portingfor DAVE

Page 13: Infineon XMC DeveloperDay

XMC Embedded Coder Library

13

Page 14: Infineon XMC DeveloperDay

XMC Embedded Coder Library V1.1

14Set date Copyright © Infineon Technologies AG 2015. All rights reserved.

Devices Matlab versions

Simulink library blocks Code generation

› XMC4500, XMC4400, XMC4200, XMC4100

› XMC1300, XMC1200, XMC1100

› Supported in Matlab r2013b, r2014a, r2014b and r2015a

› Generic C/C++ and ARM Cortex optimized

› Object generation with GNU

› GPIO config, read, write

› CCU4, CCU8, POSIF

› VADC, BCCU

› HW interrupt

› MATH coprocessor Version 1.1

Page 15: Infineon XMC DeveloperDay

XMC Embedded Coder LibraryRoadmap for V 2.0

15Set date Copyright © Infineon Technologies AG 2015. All rights reserved.

Page 16: Infineon XMC DeveloperDay

Agenda

Introduction to Simulink

XMC Embedded Coder Library

How to get best performance – CMSIS DSP-Lib

Dryrun Embedded Coder Library

Discussions

1

2

3

4

5

16

Page 17: Infineon XMC DeveloperDay

17

How to get best performance – CMSIS DSP-Lib

FIR–Filter Standard C-Code for ARM Cortex-M4

Page 18: Infineon XMC DeveloperDay

18

How to get best performance – CMSIS DSP-Lib

Page 19: Infineon XMC DeveloperDay

19

How to get best performance – CMSIS DSP-Lib

ARM Cortex-M4 inner loop of FIR-Filter

Page 20: Infineon XMC DeveloperDay

20

How to get best performance – CMSIS DSP-Lib

FIR–Filter optimized C-Code for ARM Cortex-M4

Page 21: Infineon XMC DeveloperDay

21

How to get best performance – CMSIS DSP-Lib

Page 22: Infineon XMC DeveloperDay

22

Simulink Coder supports CMSIS DSP-Lib

Page 23: Infineon XMC DeveloperDay

Agenda

Introduction to Simulink

XMC Embedded Coder Library

How to get best performance – CMSIS DSP-Lib

Dryrun Embedded Coder Library

Discussions

1

2

3

4

5

23

Page 24: Infineon XMC DeveloperDay

Dryrun Embedded Coder Library

24

Sine and Noise

Sine with Noise

Filter Out

Filtered Sine is Duty Cycle Input for PWM

Task:

A real world analog input signal with noise needs to be filtered and converted into a feed signal for a PWM pulse generator in order to supply a PWM “power output” to a load.

Page 25: Infineon XMC DeveloperDay

Dryrun Embedded Coder Library

25

Simulink Subsystem running on XMC4500

ADC-Input

PWM-Output

Filter

Page 26: Infineon XMC DeveloperDay

Dryrun Embedded Coder Library

26

Simulink Subsystem running on XMC4500

ADC (P14.1)

CCU4 (P3.9)

C-CodePOTI

LED

Page 27: Infineon XMC DeveloperDay

Agenda

Introduction to Simulink

XMC Embedded Coder Library

How to get best performance – CMSIS DSP-Lib

Dryrun Embedded Coder Library

Discussions

1

2

3

4

5

27

Page 28: Infineon XMC DeveloperDay