Skip to content

Commit 2c0fc3c

Browse files
authored
Merge pull request #213 from Infineon/develop for 1.7.0 release
2 parents 4379305 + 76426e2 commit 2c0fc3c

File tree

59 files changed

+20397
-555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+20397
-555
lines changed

.github/workflows/compile-platform-examples.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,26 @@ jobs:
9797
multiSerial: true
9898
dma: true
9999
alarmRtc: true
100+
- fqbn: Infineon:arm:XMC1400_Arduino_Kit
101+
i2s: false
102+
dieTemp: true
103+
heapMem: true
104+
sleep1100: true
105+
sleep4700 : false
106+
stackMem: false
107+
multiSerial: false
108+
dma: false
109+
alarmRtc: false
110+
- fqbn: Infineon:arm:XMC4200_Platform2GO
111+
i2s: false
112+
dieTemp: false
113+
heapMem: false
114+
sleep1100: false
115+
sleep4700 : false
116+
stackMem: true
117+
multiSerial: false
118+
dma: false
119+
alarmRtc: true
100120

101121
# Make board type-specific customizations to the matrix jobs
102122
include:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This repository integrates [Infineon's](https://www.infineon.com/) XMC microcont
2121
* [XMC1300 Sense2GoL](https://www.infineon.com/cms/de/product/evaluation-boards/demo-sense2gol/)
2222
* [XMC4400 Platform 2Go](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_plt2go_xmc4400//)
2323
* [XMC4700 Relax Kit](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc47_relax_v1/)
24-
* [DEMO Radar BB XMC4700](https://www.infineon.com/cms/en/product/evaluation-boards/demo-sense2gol-pulse/)
24+
* [XMC4700 Radar Baseboard](https://www.infineon.com/cms/en/product/evaluation-boards/demo-sense2gol-pulse/)
2525

2626

2727
## Additional Information
@@ -37,7 +37,7 @@ Please visit also the Wiki for additional information, e.g. datasheets, pin out
3737
* Page for [XMC1300 Sense2GoL](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC1300-Sense2GoL)
3838
* Page for [XMC4400 Platform 2Go](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC4400-Platform2Go)
3939
* Page for [XMC4700 Relax Kit](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC4700-Relax-Kit)
40-
* Page for [DEMO Radar BB XMC4700](https://github.com/Infineon/XMC-for-Arduino/wiki/DEMO-Radar-BB-XMC4700)
40+
* Page for [XMC4700 Radar Baseboard](https://github.com/Infineon/XMC-for-Arduino/wiki/DEMO-Radar-BB-XMC4700)
4141

4242
Additionally, please consult the [releases](https://github.com/Infineon/XMC-for-Arduino/releases) for information about the changes and new versions.
4343

boards.txt

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,89 @@ XMC1300_Sense2GoL.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
261261
#XMC1400_Boot_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
262262
#XMC1400_Boot_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN
263263

264+
####################################################
265+
XMC1400_Arduino_Kit.name=XMC1400 Kit for Arduino
266+
XMC1400_Arduino_Kit.upload.tool=xmcprog
267+
XMC1400_Arduino_Kit.upload.speed=115200
268+
XMC1400_Arduino_Kit.upload.resetmethod=ck
269+
XMC1400_Arduino_Kit.upload.maximum_size=204800
270+
XMC1400_Arduino_Kit.upload.wait_for_upload_port=true
271+
272+
XMC1400_Arduino_Kit.communication=usb
273+
XMC1400_Arduino_Kit.protocol=dragon_isp
274+
XMC1400_Arduino_Kit.program.protocol=dragon_isp
275+
XMC1400_Arduino_Kit.program.tool=xmcprog
276+
XMC1400_Arduino_Kit.program.extra_params=-Pusb
277+
278+
XMC1400_Arduino_Kit.serial.disableDTR=true
279+
XMC1400_Arduino_Kit.serial.disableRTS=true
280+
281+
XMC1400_Arduino_Kit.build.mcu=cortex-m0
282+
XMC1400_Arduino_Kit.build.f_cpu=48000000L
283+
XMC1400_Arduino_Kit.build.board=ARM_XMC
284+
XMC1400_Arduino_Kit.build.board.version=1402
285+
XMC1400_Arduino_Kit.build.board.type=T038x0200
286+
XMC1400_Arduino_Kit.build.board.v=0200
287+
XMC1400_Arduino_Kit.build.core=./
288+
XMC1400_Arduino_Kit.build.variant=XMC1400
289+
XMC1400_Arduino_Kit.build.board_variant=XMC1400_Arduino_Kit
290+
XMC1400_Arduino_Kit.build.flash_size=200K
291+
XMC1400_Arduino_Kit.build.flash_ld=linker_script_200k.ld
292+
XMC1400_Arduino_Kit.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES
293+
294+
XMC1400_Arduino_Kit.menu.UART.debug=PC
295+
XMC1400_Arduino_Kit.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC
296+
XMC1400_Arduino_Kit.menu.UART.onBoard=On Board
297+
XMC1400_Arduino_Kit.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD
298+
299+
XMC1400_Arduino_Kit.menu.LIB.NONE=None
300+
XMC1400_Arduino_Kit.menu.LIB.NONE.library.selected=
301+
XMC1400_Arduino_Kit.menu.LIB.NN=ARM NN Framework
302+
XMC1400_Arduino_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN
303+
XMC1400_Arduino_Kit.menu.LIB.DSP=ARM DSP
304+
XMC1400_Arduino_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
305+
XMC1400_Arduino_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
306+
XMC1400_Arduino_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN
307+
308+
####################################################
309+
XMC4200_Platform2GO.name=XMC4200 Platform 2GO
310+
XMC4200_Platform2GO.upload.tool=xmcprog
311+
XMC4200_Platform2GO.upload.speed=115200
312+
XMC4200_Platform2GO.upload.resetmethod=ck
313+
XMC4200_Platform2GO.upload.maximum_size=262144
314+
XMC4200_Platform2GO.upload.wait_for_upload_port=true
315+
316+
XMC4200_Platform2GO.communication=usb
317+
XMC4200_Platform2GO.protocol=dragon_isp
318+
XMC4200_Platform2GO.program.protocol=dragon_isp
319+
XMC4200_Platform2GO.program.tool=xmcprog
320+
XMC4200_Platform2GO.program.extra_params=-Pusb
321+
322+
XMC4200_Platform2GO.serial.disableDTR=true
323+
XMC4200_Platform2GO.serial.disableRTS=true
324+
325+
XMC4200_Platform2GO.build.mcu=cortex-m4
326+
XMC4200_Platform2GO.build.f_cpu=80000000L
327+
XMC4200_Platform2GO.build.board=ARM_XMC
328+
XMC4200_Platform2GO.build.board.version=4200
329+
XMC4200_Platform2GO.build.board.type=F64x256
330+
XMC4200_Platform2GO.build.board.v=256
331+
XMC4200_Platform2GO.build.core=./
332+
XMC4200_Platform2GO.build.variant=XMC4200
333+
XMC4200_Platform2GO.build.board_variant=XMC4200_Platform2GO
334+
XMC4200_Platform2GO.build.flash_size=256K
335+
XMC4200_Platform2GO.build.flash_ld=linker_script.ld
336+
XMC4200_Platform2GO.build.extra_flags=-DARM_MATH_CM4 -DARM_MATH_DSP -DINTERRUPT_USE_ERU
337+
#-DUSB0
338+
339+
XMC4200_Platform2GO.menu.LIB.NONE=None
340+
XMC4200_Platform2GO.menu.LIB.NONE.library.selected=
341+
XMC4200_Platform2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
342+
XMC4200_Platform2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN
343+
XMC4200_Platform2GO.menu.LIB.NN=ARM NN Framework
344+
XMC4200_Platform2GO.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN
345+
XMC4200_Platform2GO.menu.LIB.DSP=ARM DSP
346+
XMC4200_Platform2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
264347

265348
####################################################
266349
XMC4400_Platform2GO.name=XMC4400 Platform 2GO
@@ -308,7 +391,7 @@ XMC4400_Platform2GO.menu.LIB.DSP=ARM DSP
308391
XMC4400_Platform2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
309392

310393
####################################################
311-
XMC4700_Radar_Baseboard.name=DEMO Radar BB XMC4700
394+
XMC4700_Radar_Baseboard.name=XMC4700 Radar Baseboard
312395
XMC4700_Radar_Baseboard.upload.tool=xmcprog
313396
XMC4700_Radar_Baseboard.upload.speed=115200
314397
XMC4700_Radar_Baseboard.upload.resetmethod=ck

cores/Main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ int main(void)
4141
*/
4242
wiring_time_init();
4343
wiring_analog_init();
44-
// Initialize the reset pin for the XMC1100 Boot Kit series
45-
#ifdef XMC1100_Boot_Kit
44+
// Initialize the reset pin for the XMC1100 Boot Kit series and XMC1400 Kit for Arduino as they are based on Arduino form-factor
45+
// Hence, a dedicated reset pin is required.
46+
#ifdef HAS_GPIO_RESET
4647
reset_init();
4748
#endif
4849

cores/WInterrupts.c

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,24 @@ void ERU0_3_IRQHandler(void)
4242
}
4343
}
4444

45+
#if defined(XMC4200_Platform2GO)
46+
void ERU0_0_IRQHandler(void)
47+
{
48+
if (interrupt_1_cb)
49+
{
50+
interrupt_1_cb();
51+
}
52+
}
53+
#else
4554
void ERU1_0_IRQHandler(void)
4655
{
4756
if (interrupt_1_cb)
4857
{
4958
interrupt_1_cb();
5059
}
5160
}
61+
#endif
62+
5263
#else
5364
void CCU40_0_IRQHandler(void)
5465
{
@@ -109,10 +120,16 @@ void attachInterrupt(uint32_t interrupt_num, interrupt_cb_t callback, uint32_t m
109120
}
110121
else if (pin_irq.irq_num == 1)
111122
{
112-
NVIC_SetPriority(ERU1_0_IRQn, 3);
123+
#if defined(XMC4200_Platform2GO)
124+
NVIC_SetPriority(ERU0_0_IRQn, 3);
125+
interrupt_1_cb = callback;
126+
NVIC_EnableIRQ(ERU0_0_IRQn);
127+
#else
128+
NVIC_SetPriority(ERU1_0_IRQn, 3);
113129
interrupt_1_cb = callback;
114130
NVIC_EnableIRQ(ERU1_0_IRQn);
115-
}
131+
#endif
132+
}
116133
#else
117134
XMC_CCU4_SLICE_EVENT_CONFIG_t event_config = {0};
118135

@@ -140,7 +157,7 @@ void attachInterrupt(uint32_t interrupt_num, interrupt_cb_t callback, uint32_t m
140157

141158
if (pin_irq.irq_num == 0)
142159
{
143-
#if defined(XMC1100_Boot_Kit)
160+
#if defined(XMC1100_Boot_Kit) || defined(XMC1400_Arduino_Kit)
144161
/* P1_4 external interrupt goes through USIC to CCU4 */
145162
XMC_USIC_CH_Enable(XMC_USIC0_CH0);
146163
XMC_USIC_CH_SetInputSource(XMC_USIC0_CH0, XMC_USIC_CH_INPUT_DX5, USIC0_C0_DX5_P1_4);
@@ -159,9 +176,14 @@ void attachInterrupt(uint32_t interrupt_num, interrupt_cb_t callback, uint32_t m
159176
else if (pin_irq.irq_num == 1)
160177
{
161178
#if defined(XMC1300_Boot_Kit)
162-
/* P0_13 external interrupt goes through USIC to CCU4 */
179+
/* P0_13 external interrupt goes through USIC to CCU4 */
163180
XMC_USIC_CH_Enable(XMC_USIC0_CH0);
164181
XMC_USIC_CH_SetInputSource(XMC_USIC0_CH0, XMC_USIC_CH_INPUT_DX2, USIC0_C0_DX2_P0_13);
182+
#endif
183+
#if defined(XMC1400_Arduino_Kit)
184+
/* P1_1 external interrupt goes through USIC to CCU4 */
185+
XMC_USIC_CH_Enable(XMC_USIC0_CH1);
186+
XMC_USIC_CH_SetInputSource(XMC_USIC0_CH1, XMC_USIC_CH_INPUT_DX2, USIC0_C1_DX2_P1_1);
165187
#endif
166188
XMC_CCU4_SLICE_EnableMultipleEvents(pin_irq.slice, XMC_CCU4_SLICE_MULTI_IRQ_ID_EVENT1);
167189
XMC_CCU4_SLICE_SetInterruptNode(pin_irq.slice, XMC_CCU4_SLICE_IRQ_ID_EVENT1, 1);
@@ -190,7 +212,11 @@ void detachInterrupt(uint32_t interrupt_num)
190212
break;
191213

192214
case 1:
193-
NVIC_DisableIRQ(ERU1_0_IRQn);
215+
#if defined(XMC4200_Platform2GO)
216+
NVIC_DisableIRQ(ERU0_0_IRQn);
217+
#else
218+
NVIC_DisableIRQ(ERU1_0_IRQn);
219+
#endif
194220
break;
195221
#else
196222
switch (interrupt_num)

cores/reset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
*/
28-
#include <reset.h>
29-
#ifdef XMC1100_Boot_Kit
28+
#include <Arduino.h>
29+
#ifdef HAS_GPIO_RESET
3030
#include <xmc_eru.h>
3131
#include <xmc_scu.h>
3232

cores/reset.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
#ifndef Reset_h
3030
#define Reset_h
3131

32-
#include <Arduino.h>
33-
3432
//****************************************************************************
3533
// @External Prototypes
3634
//****************************************************************************

cores/wiring_analog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ if( ( resource = scan_map_table( mapping_pin_PWM4, pin ) ) >= 0 )
295295
( XMC_GPIO_MODE_OUTPUT_PUSH_PULL | pwm4->port_mode ) );
296296
XMC_CCU4_SLICE_StartTimer( pwm4->slice );
297297
}
298-
#ifdef CCU8V2
298+
#if defined(CCU8V2) || defined(CCU8V1)
299299
else
300300
if( ( resource = scan_map_table( mapping_pin_PWM8, pin ) ) >= 0 )
301301
{
@@ -391,7 +391,7 @@ if( frequency < PCLK )
391391
}
392392
ret = 0;
393393
}
394-
#ifdef CCU8V2
394+
#if defined (CCU8V2) || defined (CCU8V1)
395395
else
396396
if ( ( resource = scan_map_table( mapping_pin_PWM8, pin ) ) >= 0 )
397397
{

cores/wiring_time.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,37 @@ extern "C" {
8686
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
8787
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
8888
asm volatile("nop");}
89+
90+
#elif ((UC_FAMILY == XMC4) && (F_CPU == 80000000U))
91+
// 80 NOPS
92+
#define NOPS_FOR_USEC() { asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
93+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
94+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
95+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
96+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
97+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
98+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
99+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
100+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
101+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
102+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
103+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
104+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
105+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
106+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
107+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
108+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
109+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
110+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
111+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
112+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
113+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
114+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
115+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
116+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
117+
asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\
118+
asm volatile("nop"); asm volatile("nop");}
119+
89120
#elif ((UC_FAMILY == XMC1) && (F_CPU == 32000000U))
90121
// 16 NOPS
91122
#define NOPS_FOR_USEC() { asm volatile("nop"); asm volatile("nop"); asm volatile("nop");\

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

0 commit comments

Comments
 (0)