Page 1
Getting Started XMC1400 Boot Kit
XMC Microcontrollers
Dec 2015
Page 2
Agenda
1
2
3
4
5
6
Kit Overview
Hardware Overview
Tooling Overview
Getting Started
Resource Listing
References6
Copyright © Infineon Technologies AG 2015. All rights reserved.
2
Page 3
Kit Overview (1/2)
› XMC1400 Boot Kit
– Consists of an XMC1400 CPU Card
– Supported Application Cards examples: Colour LED Card,
White LED Card
(Application Card is orderable separately or as part of another Application Kit)
Colour LED Card
XMC1400 CPU Card
Copyright © Infineon Technologies AG 2015. All rights reserved.
White LED Card
3
Page 4
Kit Overview (2/2)
› XMC1400 CPU Card
On-board COM
and Segger
J-Link debugger
Micro USB
4 User LEDs
Connectors
according to pin-out
XMC1400
Copyright © Infineon Technologies AG 2015. All rights reserved.
Edge connector for
Application cards
Home Home
4
Page 5
Hardware Overview (1/2)
› Connect XMC1400 CPU Card to PC via USB cable
› CPU Card is powered up (as indicated by LED on the card)
CPU Card powered
via USB cable
› Note: Supported Application Card may be additionally connected to
the CPU card
Home Home
Copyright © Infineon Technologies AG 2015. All rights reserved.
5
Page 6
Hardware Overview (2/2)
› Kit information
Nr. Kit Name Kit Description Order Number
1 KIT_XMC14_BOOT_001 Boot Kit XMC1400 KIT_XMC14_BOOT_001
› Infineon parts utilized on Kit Nr. 1:
Infineon Parts Order Number
XMC1400 Microcontroller XMC1404-Q064X0200
XMC4200 Microcontroller XMC4200-Q48F256
3V3 regulator IFX25001MEV33
Copyright © Infineon Technologies AG 2015. All rights reserved.
6
Page 7
Tooling Overview Boot Modes
› Boot Modes available
– CAN Bootstrap-Loader Mode
– UART Bootstrap-Loader Mode
– User Mode (Halt After Reset)
– User Mode (Debug) Default Mode of device on Boot Kit
– User Mode (Productive)
› Boot Modes can be configured via:
– DAVE
– Download DAVE
DAVETMv4.1.4 download
TM
TM
– MemTool
– Download MemTool
MemTool v4.65.exe download
› For more information on how to configure the BMI value, please refer to the
XMC1000 Tooling Guide.
Home Home
Copyright © Infineon Technologies AG 2015. All rights reserved.
7
Page 8
Tooling Overview –
DAVE
› DAVE
http://infineon-community.com/LP=400
TM
TM
(1/5)
download package is available at:
Copyright © Infineon Technologies AG 2015. All rights reserved.
8
Page 9
Tooling Overview –
DAVE
TM
(2/5)
› After registration, download and unzip the installer package
› Run DAVE-4.1.4-Setup.exe to install
DAVE
› Open DAVE
TM
IDE and SEGGER J-Link drivers
TM
› Update DAVE
TM
and DAVE
TM
libraries
– Help Check for Updates
– Help Check for DAVE APP Updates
Copyright © Infineon Technologies AG 2015. All rights reserved.
9
Page 10
Tooling Overview –
DAVE
› Install DAVE
TM
(3/5)
TM
APPs libraries and Device Description
– Help Install DAVE APP/Example/Device Library
› Note: You may skip the above step if you are not using DAVE
APPs
Copyright © Infineon Technologies AG 2015. All rights reserved.
TM
10
Page 11
Tooling Overview –
DAVE
TM
(4/5)
› Select DAVE Apps Library Manager in the drop-down menu
› Select DEVICE_PACK, Library_DAVEDeviceDescriptions
(XMC1400 Device) and DAVE APPs
Copyright © Infineon Technologies AG 2015. All rights reserved.
11
Page 12
Tooling Overview –
DAVE
TM
(5/5)
› Accept terms of the license agreements and click Finish
› DAVE
TM
APPs libraries and Device Description are installed
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
12
Page 13
Getting Started – Example –
Blinky based on XMC Lib (1/8)
1. Open DAVE
TM
2. Create a new “Simple Main”
project:
– File New DAVE Project
– Enter project name e.g.
“XMC1400_BlinkyMCAN”
– Select “Simple Main Project” as
Project Type
3. Select the device accordingly
Copyright © Infineon Technologies AG 2015. All rights reserved.
13
Page 14
Getting Started – Example –
Blinky based on XMC Lib (2/8)
› For this project, we will use
– System clock frequency of 8MHz
– LED on Port pin
– System timer, SysTick, as the time base for interrupt
– P4.9 for CAN Tx and P4.8 for CAN Rx
› Next, we will show you how to
1. Set up the System or Main Clock (MCLK)
2. Configure Port pin
3. Configure SysTick and define its exception service routine
4. Configure 2 CAN message objects
5. Configure P4.9 for CAN Tx and P4.8 for CAN Rx
Copyright © Infineon Technologies AG 2015. All rights reserved.
14
Page 15
Getting Started – Example –
Blinky based on XMC Lib (3/8)
1. Set up System or Main Clock (MCLK) and include the required
header files.
– MCLK configured via IDIV and FDIV bit fields in
XMC_SCU_CLOCK_CONFIG data structure
– Initializes clock generators ad clock tree in Main.c to set MCLK
= 48MHz and PCLK = 96MHz
Copyright © Infineon Technologies AG 2015. All rights reserved.
15
Page 16
Getting Started – Example –
Blinky based on XMC Lib (4/8)
2. Configure Port pin
– GPIO to toggle the LED is configured via mode and output_level of
XMC_GPIOC_CONFIG structure. P4.0 will toggle at regular interval.
P4.1 will toggle when CAN message transmit and P4.3 toggle when
CAN message received.
– Configure P4.9 as CAN Tx pin and P4.8 as CAN Rx pin.
Copyright © Infineon Technologies AG 2015. All rights reserved.
16
Page 17
Getting Started – Example –
Blinky based on XMC Lib (5/8)
3. Configure SysTick and define its exception service routine
– SysTick exception handler is defined in startup_XMC1300.s by using
the macro.
– Initialize the SysTick in Main.c
– Define the SysTick exception handler routine. Every 0.5s, toggle
P4.0 and transmit the CAN message, followed by toggle P4.1.
Copyright © Infineon Technologies AG 2015. All rights reserved.
17
Page 18
Getting Started – Example –
Blinky based on XMC Lib (6/8)
4. Configure CAN node 1 baudrate and CAN message object
– Configure Tx message object and its data bytes
– Configure Rx message object
Copyright © Infineon Technologies AG 2015. All rights reserved.
18
Page 19
Getting Started – Example –
Blinky based on XMC Lib (7/8)
5. Set CAN Rx interrupt service request number and allocate the
message objects to CAN node 1.
– Define the interrupt event handler for CAN node
Copyright © Infineon Technologies AG 2015. All rights reserved.
19
Page 20
Getting Started – Example –
Blinky based on XMC Lib (8/8)
› Build project
1. Click
2. Wait for Build to finish
› Download code
1. Click
2. Switch to Debug perspective
3. Click to run code
› LED LEDs P40, P41 blinks every 0.5s
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
20
Page 21
Getting Started – Example –
Blinky based on DAVE
1. Open DAVE
TM
TM
APPs (1/13)
2. Create a new “DAVE CE” project:
– File New DAVE Project
– Enter project name e.g.
“XMC1400_BlinkyMCAN_withApps”
– Select “DAVE CE Project” as
Project Type
3. S e l e c t the d e vi c e a c c o r d i ng l y
Copyright © Infineon Technologies AG 2015. All rights reserved.
21
Page 22
Getting Started – Example –
Blinky based on DAVE
TM
APPs (2/13)
› For this project, we will use
– System clock frequency of 48MHz
– LED on Port pin
– System timer as the time base for interrupt
› Next, we will show you how to
1. Set up the System or Main Clock (MCLK)
2. Configure Port pin
3. Configure System Timer and define its exception service
routine
4. Configure CAN Node
5. Configure CAN Message Objects, CAN Tx/Rx pin and ISR
Copyright © Infineon Technologies AG 2015. All rights reserved.
22
Page 23
Getting Started – Example –
Blinky based on DAVE
TM
APPs (3/13)
1. Set up System or Main Clock (MCLK)
– Click to add new APP
– Double-click CLOCK_XMC1 APP and
close window
– Open APP configuration editor
– In APP Dependency view, double-click
CLOCK_XMC1
– Configure APP instance
– In APP configuration window, set Main
clock (MCLK) to 48MHz
Copyright © Infineon Technologies AG 2015. All rights reserved.
23
Page 24
Getting Started – Example –
Blinky based on DAVE
TM
2. Configure Port pin
– Click to add new APP
– Double-click DIGITAL_IO APP and
close window
– Open APP configuration editor
– In APP Dependency view, double-
click DIGITAL_IO
– Configure APP instance
– In APP configuration window, set Pin
APPs (4/13)
– Assign pin to P4.0
direction to Input/Output and set
Initial output level to High
Copyright © Infineon Technologies AG 2015. All rights reserved.
–Click to open Manual Pin Allocator
–Set Pin Number (Port) to #59 (P4.0)
–Save and closed
– P4.0 will toggle output at 0.5s interval
24
Page 25
Getting Started – Example –
Blinky based on DAVE
TM
APPs (5/13)
3. Configure Port pin P4.1 and P4.3 using steps described in 2.
– P4.1 will toggle output when CAN message transmitted
– P4.3 will toggle output when CAN message received
Copyright © Infineon Technologies AG 2015. All rights reserved.
25
Page 26
Getting Started – Example –
Blinky based on DAVE
TM
APPs (6/13)
3. Configure System Timer and define its
exception service routine
– Click to add new APP
– Double-click SYSTIMER APP and close window
– Open APP configuration editor
– In APP Dependency view, double-click SYSTIMER
– Configure APP instance
– In APP configuration window, under General
Settings tab, set System timer tick interval to
100000us (0.1s)
Copyright © Infineon Technologies AG 2015. All rights reserved.
26
Page 27
Getting Started – Example –
Blinky based on DAVE
– Create software timer using SYSTIMER Apps.
– Define exception handler routine in Main.c
– Define the toggle interval (in usec)
TM
APPs (7/13)
Copyright © Infineon Technologies AG 2015. All rights reserved.
27
Page 28
Getting Started – Example –
Blinky based on DAVE
TM
APPs (8/13)
4. Configure CAN node
– Click to add new APP
– Double-click CAN_NODE APP and close window
– Open APP configuration editor
– In APP Dependency view, double-click
GLOBAL_CAN
– Configure APP instance
– In APP configuration window, under General
Settings tab, set Desired CAN frequency
(MHz) to 11
Copyright © Infineon Technologies AG 2015. All rights reserved.
28
Page 29
Getting Started – Example –
Blinky based on DAVE
TM
APPs (9/13)
5. Configure CAN Message Objects
– Open APP configuration editor
– In APP Dependency view, double-click
CAN_NODE
– Configure APP instance
– In APP configuration window, under General
Settings tab, set Number of message objects
in the list to 2
– Under Event Settings , enable Enable node alert
– Under MO Settings_Page1, setup a TX message
object with 8 data bytes,Identifier value = 0x3FF
– Under MO Settings_Page1, setup a RX message
object with Identifier value = 0x2FF.
Copyright © Infineon Technologies AG 2015. All rights reserved.
29
Page 30
Getting Started – Example –
Blinky based on DAVE
TM
APPs (10/13)
– Click to add new APP
– Double-click INTERRUPT APP and close
window
– Open APP configuration editor
– In APP Dependency view, double-click
INTERRUPT
– Configure APP instance
– In APP configuration window, configure ISR for
CAN_NODE_0 as “EventHandler_CanNode_0”
Copyright © Infineon Technologies AG 2015. All rights reserved.
30
Page 31
Getting Started – Example –
Blinky based on DAVE
TM
APPs (11/13)
– Right click on the CAN_NODE_0 APP and select
HW signal connection
– Select MO transmit event and link it to NVIC
node. Then, click and link MO received
event to NVIC node.
– Assign CAN TX pin to P4.9 and CAN RX pin to P4.8
– Click to open Manual Pin Allocator
– Set the desired pins as shown on the right
– Save and closed
Copyright © Infineon Technologies AG 2015. All rights reserved.
31
Page 32
Getting Started – Example –
Blinky based on DAVE
– Add the Interrupt Service Routine for
CAN_Node_0 to main.c
TM
APPs (12/13)
Copyright © Infineon Technologies AG 2015. All rights reserved.
32
Page 33
Getting Started – Example –
Blinky based on DAVE
› Generate code
1. Click
› Build project
1. Click
2. Wait for Build to finish
TM
APPs (13/13)
› Download code
1. Click
2. Switch to Debug perspective
3. Click to run code
› LEDs P40, P41 blinks every 0.5s
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
33
Page 34
References –
Where to find XMC Lib documentation?
1. Go to DAVE
TM
Version 4 website
http://www.infineon.com/dave/v4
2. Download XMC Lib and unzip file
3. Open XMC1_Peripheral_Library
4. Cl i ck on M o d u l e s or F i l e s
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
34
Page 35
Resource Listing
› Kit documentation:
– Boot Kit XMC1400
Copyright © Infineon Technologies AG 2015. All rights reserved.
35
Page 36
References –
Where to find App Documentation?
1. In DAVE
TM
, go to Help Help Contents
2. Expand DAVE Apps Click on CLOCK_XMC1 Overview
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
36
Page 37
References –
Where to download Example Projects?
1. Example Project library within DAVE
2. DAVE
TM
website
3. Example from XMC Lib package
TM
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
37
Page 38
References –
How to load Example Project in DAVE
3. Select Examples in the Libraries
› Example Project library within
DAVE
1. Help Install DAVE
TM
APP/Example/Device Library
window Click Next
TM
? (1/4)
2. Select DAVE Project Library
Manager
Copyright © Infineon Technologies AG 2015. All rights reserved.
4. Accept terms of the license
agreements Click Finish
38
Page 39
References –
How to load Example Project in DAVE
› DAVE
TM
website
1. Go to DAVE
website
http://www.infineon.com/dave/v4
2. Download DAVE
TM
Version 4
TM
EXAMPLES
5. Select Archive File Browse to
downloaded project zip file
TM
? (2/4)
3. In DAVE TM, go to File
Import
4. Select DAVE Project Next
Copyright © Infineon Technologies AG 2015. All rights reserved.
6. Click Finish
39
Page 40
References –
How to load Example Project in DAVE
3. Example code (main.c) can be
› Example from XMC Lib
package
1. Go to DAVE
website
http://www.infineon.com/dave/v4
2. Download XMC Lib and unzip
file
TM
Version 4
4. Create new “Simple Main Project”
found within XMC Lib package
in DAVE
TM
? (3/4)
TM
Copyright © Infineon Technologies AG 2015. All rights reserved.
40
Page 41
References –
How to load Example Project in DAVE
5. Select target device of
selected main.c example
6. Delete main.c in the newly
8. Click to Build project
9. Click to download and run
project on target board
TM
? (4/4)
created DAVE project
7. Copy main.c from XMC Lib
example into DAVE project
Copyright © Infineon Technologies AG 2015. All rights reserved.
Home Home
41
Page 42
Support material:
Collaterals and
Brochures
Technical Material
Videos
› Product Briefs
› Selection Guides
› Application Brochures
› Presentations
› Press Releases, Ads
› Application Notes
› Technical Articles
› Simulation Models
› Datasheets, MCDS Files
› PCB Design Data
› Technical Videos
› www.infineon.com/XMC
› www.infineon.com/XMC
› Kits and Boards
› DAVE
› Software and Tool Ecosystem
› Infineon Media Center
TM
Contact
› Product Information
Videos
› Forums
› Product Support
Copyright © Infineon Technologies AG 2015. All rights reserved.
› XMC Mediathek
› Infineon Forums
› Technical Assistance Center (TAC)
42
Page 43
Glossary abbreviations
› ADC Analog Digital Converter
› DAVE™ Free development IDE for XMC
› MO Message Object
› PWM Pulse Width Modulation
Copyright © Infineon Technologies AG 2015. All rights reserved.
43
Page 44
Disclaimer
The information given in this training materials is given as a hint for
the implementation of the Infineon Technologies component only and
shall not be regarded as any description or warranty of a certain
functionality, condition or quality of the Infineon Technologies
component.
Infineon Technologies hereby disclaims any and all warranties and
liabilities of any kind (including without limitation warranties of noninfringement of intellectual property rights of any third party) with
respect to any and all information given in this training material.
Page 45