Skip to content

Commit 0188fdc

Browse files
authored
Merge pull request #219 from Infineon/develop
Develop
2 parents b6e26b6 + 5aab1e8 commit 0188fdc

File tree

4 files changed

+88
-48
lines changed

4 files changed

+88
-48
lines changed

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
This repository integrates [Infineon's](https://www.infineon.com/) XMC microcontrollers into the [Arduino IDE](https://www.arduino.cc/en/main/software) and [PlatformIO IDE](https://platformio.org/platformio-ide?utm_source=github&utm_medium=xmc-for-arduino).
55

66
## Contents
7-
- [Supported Microcontroller Boards](#supported-microcontroller-boards)
8-
- [Additional Information](#additional-information)
9-
- [Installation Instructions](#installation-instructions)
10-
* [Prework for SEGGER J-Link](#prework-for-segger-j-link)
11-
* [Using Arduino IDE](#using-arduino-ide)
12-
* [Using PlatformIO IDE](#using-platformio-ide)
13-
- [Additional Contributors](#additional-contributors)
7+
- [Infineon's XMC Microcontroller Boards for Arduino](#infineons-xmc-microcontroller-boards-for-arduino)
8+
- [Contents](#contents)
9+
- [Supported Microcontroller Boards](#supported-microcontroller-boards)
10+
- [Additional Information](#additional-information)
11+
- [Installation Instructions](#installation-instructions)
12+
- [Prework for SEGGER J-Link](#prework-for-segger-j-link)
13+
- [Using Arduino IDE](#using-arduino-ide)
14+
- [Separation of release packages from version 2.0.0 onwards](#separation-of-release-packages-from-version-200-onwards)
15+
- [Using PlatformIO IDE](#using-platformio-ide)
16+
- [Contributing and Third Party Libraries](#contributing-and-third-party-libraries)
17+
- [Additional Contributors](#additional-contributors)
1418

1519
## Supported Microcontroller Boards
1620

@@ -45,6 +49,8 @@ If you have already installed '[DAVE™ - Development Platform for XMC™ Microc
4549

4650
![J-Link](https://raw.githubusercontent.com/infineon/assets/master/Pictures/J-Link_Packages.png)
4751

52+
**Note:** The XMC-for-Arduino BSP installs the **XMC Flasher** tool used to flash the compiled firmware (.hex) into the XMC device. However this tool requires **Java(TM) SE Runtime Environment** to be installed in the host system. Java(TM) SE Runtime Environment version **1.8.0** is known to be compatible with the tool.
53+
4854
### Using Arduino IDE
4955

5056
![Preferences](https://raw.githubusercontent.com/infineon/assets/master/Pictures/Preferences.png)
@@ -66,6 +72,8 @@ To install the boards, please navigate to **Tools** > **Board** > **Boards Manag
6672

6773
![Infineon Board Entry](https://raw.githubusercontent.com/infineon/assets/master/Pictures/Boards_Manager_Entry.png)
6874

75+
**Note:** For information on separation of release packages from version 2.0.0 onwards, see [below](#Separation-of-release-packages-from-version-2.0.0-onwards).
76+
6977
In the boards list **Tools** > **Board**, the XMC microcontroller boards are added and can be used from now on.
7078

7179
![Board List](https://raw.githubusercontent.com/infineon/assets/master/Pictures/Board_List.png)
@@ -78,6 +86,22 @@ In the boards list **Tools** > **Board**, the XMC microcontroller boards are add
7886
* Arduino 1.8.0 IDE might have problems with the XMC-for-Arduino releases
7987
* XMC-for-Arduino support for 'arm-linux-gnueabihf' only until version 1.1.
8088

89+
90+
#### Separation of release packages from version 2.0.0 onwards
91+
92+
Certain obsolete boards (see wiki) and non-functional libraries were removed from the board support package for the release version 2.0.0, alongwith some other major changes (see release notes). However, in order to support legacy code, these removed boards/libraries are still available as a part of release version 1.7.0. Hence, the release packages have been split as shown in the pictures below.
93+
94+
![Board Manager](https://raw.githubusercontent.com/Infineon/Assets/version-2.x/Pictures/Boards_Manager_Entry_v2.png)
95+
96+
The boards until version 1.7.0 have been clubbed under *XMC Family V1.x*.
97+
98+
![Board list v1x](https://raw.githubusercontent.com/Infineon/Assets/version-2.x/Pictures/Board_List_v1x.png.jpg)
99+
100+
Any new board or feature integration will only be done in the *XMC Family V2.x*
101+
102+
![Board list v1x](https://raw.githubusercontent.com/Infineon/Assets/version-2.x/Pictures/Board_List_v2x.png.jpg)
103+
104+
81105
### Using PlatformIO IDE
82106

83107
- [What is PlatformIO?](http://docs.platformio.org/en/latest/what-is-platformio.html?utm_source=github&utm_medium=xmc-for-arduino)

package/package_infineon_index.template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"platforms":[
1212
{
13-
"name":"Infineon's XMC Microcontroller",
13+
"name":"Infineon's XMC Microcontroller V2.x",
1414
"architecture":"xmc",
1515
"version":"",
1616
"category":"Contributed",
@@ -19,7 +19,7 @@
1919
"checksum":"",
2020
"size":"",
2121
"help":{
22-
"online":""
22+
"online":"https://github.com/Infineon/XMC-for-Arduino/wiki"
2323
},
2424
"boards":[
2525
{

platform.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
# The information about this Arduino compatible environment
77
# ---------
8-
name=XMC Family
9-
version=1.6.0
8+
name=XMC Family V2.x
9+
version=2.0.0
1010

1111
# Build related core definitions
1212
# ---------

variants/XMC4400/config/XMC4400_Platform2GO/pins_arduino.h

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,17 @@ extern uint8_t SCK;
9696
#define A16 16
9797
#define A17 17
9898

99-
#define LED1 66
100-
#define LED2 63
99+
#define LED1 65
100+
#define LED2 62
101101
#define LED_BUILTIN LED1
102102

103-
#define BUTTON1 69
104-
#define BUTTON2 58
103+
#define BUTTON1 68
104+
#define BUTTON2 57
105105

106106
#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))
107107

108108
#ifdef ARDUINO_MAIN
109109
// Mapping of digital pins and comments
110-
/***
111-
IMPORTANT NOTE
112-
Entry at Arduino pin 14 is a PLACEHOLDER
113-
Invalid pin assignment, but removing would lead to breaking legacy code, due to change
114-
of other pin assignments.
115-
***/
116110
const XMC_PORT_PIN_t mapping_port_pin[]=
117111
{
118112
/* 0 */ {XMC_GPIO_PORT2, 15}, // RX P2.15 X1-4
@@ -169,29 +163,29 @@ const XMC_PORT_PIN_t mapping_port_pin[]=
169163
/* 49 */ {XMC_GPIO_PORT15, 8}, // A16 / ETH_CLK P15.8 X1-38
170164

171165
//Additional pins for port X2 starting here
172-
/* 51 */ {XMC_GPIO_PORT14, 8}, // A14 / DAC 0 Output P14.8 X2-33
173-
/* 52 */ {XMC_GPIO_PORT15, 2}, // A12 - ADC Input P15.2 (INPUT ONLY) X2-32
174-
/* 53 */ {XMC_GPIO_PORT14, 15}, // A11 - ADC Input P14.15 (INPUT ONLY) X2-29
175-
/* 54 */ {XMC_GPIO_PORT15, 9}, // A17 - ADC Input / ETH_CRS P15.9 X2-27
176-
/* 55 */ {XMC_GPIO_PORT14, 6}, // A6 / AN1_2GO_1 - ADC Input P14.6 (INPUT ONLY) X2-25
177-
/* 56 */ {XMC_GPIO_PORT14, 12}, // A8 / AN1_2GO_2 - ADC Input P14.12 (INPUT ONLY) X2-23
178-
/* 57 */ {XMC_GPIO_PORT14, 14}, // A10 / ADC Input P14.14 (INPUT ONLY) X2-21
179-
/* 58 */ {XMC_GPIO_PORT3, 2}, // BUTTON2 P3.2 X2-17
180-
/* 59 */ {XMC_GPIO_PORT0, 10}, // INT / GPIO3_2GO_1 P0.10 X2-15
181-
/* 60 */ {XMC_GPIO_PORT0, 1}, // INT P0.1 X2-13
182-
/* 61 */ {XMC_GPIO_PORT0, 3}, // INT / GPIO3_2GO_2 P0.3 X2-11
183-
/* 62 */ {XMC_GPIO_PORT3, 5}, // CS_2GO_1 P3.5 (Chip Select - Slot 1) X2-3
184-
/* 63 */ {XMC_GPIO_PORT0, 7}, // LED2 P0.7 X2-1
185-
/* 64 */ {XMC_GPIO_PORT0, 8}, // QSPI_CLK P0.8 X2-4
186-
/* 65 */ {XMC_GPIO_PORT0, 12}, // CS_MB P0.12 (Chip Select - MikroBUS) X2-10
187-
/* 66 */ {XMC_GPIO_PORT0, 6}, // LED1 P0.6 X2-12
188-
/* 67 */ {XMC_GPIO_PORT0, 4}, // ETH_TXEN P0.4 X2-14
189-
/* 68 */ {XMC_GPIO_PORT0, 9}, // GPIO4_2GO_1 / PWM80-12 / PWM P0.9 X2-20
190-
/* 69 */ {XMC_GPIO_PORT3, 1}, // BUTTON1 P3.1 X2-22
191-
/* 70 */ {XMC_GPIO_PORT14, 13}, // A9 / AN2_2GO_2 - ADC Input P14.13 (INPUT ONLY) X2-26
192-
/* 71 */ {XMC_GPIO_PORT14, 7}, // A7 / AN2_2GO_1 - ADC Input P14.7 (INPUT ONLY) X2-28
193-
/* 72 */ {XMC_GPIO_PORT15, 3}, // A13 - ADC Input P15.3 (INPUT ONLY) X2-34
194-
/* 73 */ {XMC_GPIO_PORT14, 9} // A15 / DAC 1 Output P14.9 X2-36
166+
/* 50 */ {XMC_GPIO_PORT14, 8}, // A14 / DAC 0 Output P14.8 X2-33
167+
/* 51 */ {XMC_GPIO_PORT15, 2}, // A12 - ADC Input P15.2 (INPUT ONLY) X2-32
168+
/* 52 */ {XMC_GPIO_PORT14, 15}, // A11 - ADC Input P14.15 (INPUT ONLY) X2-29
169+
/* 53 */ {XMC_GPIO_PORT15, 9}, // A17 - ADC Input / ETH_CRS P15.9 X2-27
170+
/* 54 */ {XMC_GPIO_PORT14, 6}, // A6 / AN1_2GO_1 - ADC Input P14.6 (INPUT ONLY) X2-25
171+
/* 55 */ {XMC_GPIO_PORT14, 12}, // A8 / AN1_2GO_2 - ADC Input P14.12 (INPUT ONLY) X2-23
172+
/* 56 */ {XMC_GPIO_PORT14, 14}, // A10 / ADC Input P14.14 (INPUT ONLY) X2-21
173+
/* 57 */ {XMC_GPIO_PORT3, 2}, // BUTTON2 P3.2 X2-17
174+
/* 58 */ {XMC_GPIO_PORT0, 10}, // INT / GPIO3_2GO_1 P0.10 X2-15
175+
/* 59 */ {XMC_GPIO_PORT0, 1}, // INT P0.1 X2-13
176+
/* 60 */ {XMC_GPIO_PORT0, 3}, // INT / GPIO3_2GO_2 P0.3 X2-11
177+
/* 61 */ {XMC_GPIO_PORT3, 5}, // CS_2GO_1 P3.5 (Chip Select - Slot 1) X2-3
178+
/* 62 */ {XMC_GPIO_PORT0, 7}, // LED2 P0.7 X2-1
179+
/* 63 */ {XMC_GPIO_PORT0, 8}, // QSPI_CLK P0.8 X2-4
180+
/* 64 */ {XMC_GPIO_PORT0, 12}, // CS_MB P0.12 (Chip Select - MikroBUS) X2-10
181+
/* 65 */ {XMC_GPIO_PORT0, 6}, // LED1 P0.6 X2-12
182+
/* 66 */ {XMC_GPIO_PORT0, 4}, // ETH_TXEN P0.4 X2-14
183+
/* 67 */ {XMC_GPIO_PORT0, 9}, // GPIO4_2GO_1 / PWM80-12 / PWM P0.9 X2-20
184+
/* 68 */ {XMC_GPIO_PORT3, 1}, // BUTTON1 P3.1 X2-22
185+
/* 69 */ {XMC_GPIO_PORT14, 13}, // A9 / AN2_2GO_2 - ADC Input P14.13 (INPUT ONLY) X2-26
186+
/* 70 */ {XMC_GPIO_PORT14, 7}, // A7 / AN2_2GO_1 - ADC Input P14.7 (INPUT ONLY) X2-28
187+
/* 71 */ {XMC_GPIO_PORT15, 3}, // A13 - ADC Input P15.3 (INPUT ONLY) X2-34
188+
/* 72 */ {XMC_GPIO_PORT14, 9} // A15 / DAC 1 Output P14.9 X2-36
195189
};
196190
const uint8_t GND = ( sizeof( mapping_port_pin ) / sizeof( XMC_PORT_PIN_t ) );
197191
const uint8_t NUM_DIGITAL = ( sizeof( mapping_port_pin ) / sizeof( XMC_PORT_PIN_t ) );;
@@ -235,17 +229,39 @@ const uint8_t NUM_PWM4 = ( sizeof( mapping_pwm4 ) / sizeof( XMC_PWM4_t ) );
235229
const uint8_t mapping_pin_PWM8[][ 2 ] = {
236230
{ 9, 0 }, // PWM3
237231
{ 10, 1 }, // PWM4
238-
<<<<<<< HEAD
239232
{ 25, 2 }, // PWM
240233
{ 29, 3 }, // PWM
241234
{ 30, 4 }, // PWM
235+
{ 45, 5 }, // PWM
236+
{ 46, 6 }, // PWM
237+
{ 48, 7 }, // PWM
238+
{ 67, 8 }, // PWM
239+
{ 255, 255 } };
240+
241+
/* Configurations of PWM channels for CCU8 type */
242+
XMC_PWM8_t mapping_pwm8[] =
243+
{
242244
{CCU80, CCU80_CC83, 3, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[9], P0_11_AF_CCU80_OUT31, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 9 P0.11
245+
{CCU80, CCU80_CC80, 0, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[10], P0_2_AF_CCU80_OUT01, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 10 P0.2
246+
//additional pwm outputs starting here
247+
{CCU80, CCU80_CC83, 3, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[25], P2_8_AF_CCU80_OUT32, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 25 P2.8
248+
{CCU81, CCU81_CC82, 2, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[29], P2_0_AF_CCU81_OUT21, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 29 P2.0
249+
{CCU80, CCU80_CC81, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[30], P2_6_AF_CCU80_OUT13, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 30 P2.6
243250
{CCU81, CCU81_CC80, 0, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[45], P5_7_AF_CCU81_OUT02, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 45 P5.7
244-
{CCU80, CCU80_CC81, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[31], P2_6_AF_CCU80_OUT13, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 31 P2.6
251+
{CCU80, CCU80_CC80, 0, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[46], P2_7_AF_CCU80_OUT03, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 46 P2.7
252+
{CCU80, CCU80_CC82, 2, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[48], P2_9_AF_CCU80_OUT22, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 48 P2.9
253+
{CCU80, CCU80_CC81, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[67], P0_9_AF_CCU80_OUT12, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED} // PWM disabled 67 P0.9
254+
};
245255

256+
const uint8_t NUM_PWM8 = ( sizeof( mapping_pwm8 ) / sizeof( XMC_PWM8_t ) );
257+
const uint8_t NUM_PWM = ( sizeof( mapping_pwm4 ) / sizeof( XMC_PWM4_t ) )
258+
+ ( sizeof( mapping_pwm8 ) / sizeof( XMC_PWM8_t ) );
259+
260+
/* Analog Pin mappings and configurations */
261+
#ifdef DAC
246262
const uint8_t mapping_pin_DAC[][ 2 ] = {
247-
{ 51, 0 },
248-
{ 73, 1 },
263+
{ 50, 0 },
264+
{ 72, 1 },
249265
{ 255, 255 } };
250266

251267
/* Analog Pin mappings and configurations */

0 commit comments

Comments
 (0)