Skip to content

Commit e6130e8

Browse files
committed
Resolved conflict with 1.x master history
2 parents 14784d4 + 2c0fc3c commit e6130e8

File tree

4 files changed

+40
-56
lines changed

4 files changed

+40
-56
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ This repository integrates [Infineon's](https://www.infineon.com/) XMC microcont
2121
* [XMC4400 Platform 2Go](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_plt2go_xmc4400//)
2222
* [XMC4700 Relax Kit](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc47_relax_v1/)
2323

24-
2524
## Additional Information
2625

2726
Please visit also the Wiki for additional information, e.g. datasheets, pin out diagrams, etc.:

keywords.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ LED6 LITERAL1
5454
BUTTON1 LITERAL1
5555
BUTTON2 LITERAL1
5656

57-
# Radar Baseboard XMC4700 only
57+
# XMC4700 Radar Baseboard only
5858
LED_RED LITERAL1
5959
LED_BLUE LITERAL1
6060
LED_GREEN LITERAL1

platform.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ build.usb_manufacturer="Unknown"
6060
compiler.c.flags=-mcpu={build.mcu} -mthumb -c -g -Os {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD
6161
#compiler.c.extra_flags=-ftime-report
6262
compiler.c.extra_flags=
63+
compiler.libraries.ldflags=
6364

6465
compiler.c.elf.flags=-Os -Wl,--gc-sections -save-temps
6566
compiler.c.elf.extra_flags=
@@ -96,7 +97,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DXMC{bu
9697
# ----------------
9798

9899
## Combine gc-sections, archives, and objects
99-
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mthumb --specs=nosys.specs --specs=nano.specs -mcpu={build.mcu} {compiler.c.elf.flags} "-T{build.flash_ld_path}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align {object_files} "{build.path}/{archive_file}" -lm
100+
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mthumb --specs=nosys.specs --specs=nano.specs -mcpu={build.mcu} {compiler.c.elf.flags} "-T{build.flash_ld_path}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align {object_files} "{build.path}/{archive_file}" {compiler.libraries.ldflags} -lm
100101

101102
## Create archives
102103
# ----------------

variants/XMC4400/config/XMC4400_Platform2GO/pins_arduino.h

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

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

103-
#define BUTTON1 68
104-
#define BUTTON2 57
103+
#define BUTTON1 69
104+
#define BUTTON2 58
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+
***/
110116
const XMC_PORT_PIN_t mapping_port_pin[]=
111117
{
112118
/* 0 */ {XMC_GPIO_PORT2, 15}, // RX P2.15 X1-4
@@ -163,29 +169,29 @@ const XMC_PORT_PIN_t mapping_port_pin[]=
163169
/* 49 */ {XMC_GPIO_PORT15, 8}, // A16 / ETH_CLK P15.8 X1-38
164170

165171
//Additional pins for port X2 starting here
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
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
189195
};
190196
const uint8_t GND = ( sizeof( mapping_port_pin ) / sizeof( XMC_PORT_PIN_t ) );
191197
const uint8_t NUM_DIGITAL = ( sizeof( mapping_port_pin ) / sizeof( XMC_PORT_PIN_t ) );;
@@ -229,39 +235,17 @@ const uint8_t NUM_PWM4 = ( sizeof( mapping_pwm4 ) / sizeof( XMC_PWM4_t ) );
229235
const uint8_t mapping_pin_PWM8[][ 2 ] = {
230236
{ 9, 0 }, // PWM3
231237
{ 10, 1 }, // PWM4
238+
<<<<<<< HEAD
232239
{ 25, 2 }, // PWM
233240
{ 29, 3 }, // PWM
234241
{ 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-
{
244242
{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
250243
{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
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-
};
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
255245

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
262246
const uint8_t mapping_pin_DAC[][ 2 ] = {
263-
{ 50, 0 },
264-
{ 72, 1 },
247+
{ 51, 0 },
248+
{ 73, 1 },
265249
{ 255, 255 } };
266250

267251
/* Analog Pin mappings and configurations */

0 commit comments

Comments
 (0)