Skip to content

Commit

Permalink
Merge branch 'develop' into dm_2978
Browse files Browse the repository at this point in the history
  • Loading branch information
boramonideep committed Mar 8, 2023
2 parents afe5f67 + 2ad9002 commit de8e4bd
Show file tree
Hide file tree
Showing 19 changed files with 9,389 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/compile-platform-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ jobs:
stackMem: true
dma: false
alarmRtc: false
- fqbn: Infineon:xmc:XMC1300_Boot_Kit
i2s: false
dieTemp: true
heapMem: true
sleep1100: true
sleep4700 : false
stackMem: true
multiSerial: false
dma: false
alarmRtc: false
- fqbn: Infineon:xmc:XMC4200_Platform2GO
i2s: false
dieTemp: false
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This repository integrates [Infineon's](https://www.infineon.com/) XMC microcont

* [XMC1100 XMC 2Go](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_2go_xmc1100_v1/)
* [XMC1100 Boot Kit](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc11_boot_001/)
* [XMC1300 Boot Kit](https://www.infineon.com/cms/de/product/evaluation-boards/kit_xmc13_boot_001/)
* [XMC1400 Kit for Arduino](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc1400_arduino/)
* [XMC4200 Platform 2Go](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_plt2go_xmc4200/)
* [XMC4400 Platform 2Go](https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc_plt2go_xmc4400//)
Expand All @@ -34,6 +35,7 @@ Please visit also the Wiki for additional information, e.g. datasheets, pin out

* Page for [XMC1100 XMC 2Go](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC-2Go)
* Page for [XMC1100 Boot Kit](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC1100-Boot-Kit)
* Page for [XMC1300 Boot Kit](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC1300-Boot-Kit)
* Page for [XMC1400 Kit for Arduino](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC1400-Kit-for-Arduino)
* Page for [XMC4200 Platform 2Go](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC4200-Platform2Go)
* Page for [XMC4400 Platform 2Go](https://github.com/Infineon/XMC-for-Arduino/wiki/XMC4400-Platform2Go)
Expand Down
44 changes: 44 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,50 @@ XMC1100_XMC2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
XMC1100_XMC2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
XMC1100_XMC2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN

####################################################
XMC1300_Boot_Kit.name=XMC1300 Boot Kit
XMC1300_Boot_Kit.upload.tool=xmcprog
XMC1300_Boot_Kit.upload.speed=115200
XMC1300_Boot_Kit.upload.resetmethod=ck
XMC1300_Boot_Kit.upload.maximum_size=204800
XMC1300_Boot_Kit.upload.wait_for_upload_port=true

XMC1300_Boot_Kit.communication=usb
XMC1300_Boot_Kit.protocol=dragon_isp
XMC1300_Boot_Kit.program.protocol=dragon_isp
XMC1300_Boot_Kit.program.tool=xmcprog
XMC1300_Boot_Kit.program.extra_params=-Pusb

XMC1300_Boot_Kit.serial.disableDTR=true
XMC1300_Boot_Kit.serial.disableRTS=true

XMC1300_Boot_Kit.build.mcu=cortex-m0
XMC1300_Boot_Kit.build.f_cpu=32000000L
XMC1300_Boot_Kit.build.board=ARM_XMC
XMC1300_Boot_Kit.build.board.version=1302
XMC1300_Boot_Kit.build.board.type=T038x0200
XMC1300_Boot_Kit.build.board.v=0200
XMC1300_Boot_Kit.build.core=./
XMC1300_Boot_Kit.build.variant=XMC1300
XMC1300_Boot_Kit.build.board_variant=XMC1300_Boot_Kit
XMC1300_Boot_Kit.build.flash_size=200K
XMC1300_Boot_Kit.build.flash_ld=linker_script_200k.ld
XMC1300_Boot_Kit.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES

XMC1300_Boot_Kit.menu.UART.debug=PC
XMC1300_Boot_Kit.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC
XMC1300_Boot_Kit.menu.UART.onBoard=On Board
XMC1300_Boot_Kit.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD

XMC1300_Boot_Kit.menu.LIB.NONE=None
XMC1300_Boot_Kit.menu.LIB.NONE.library.selected=
XMC1300_Boot_Kit.menu.LIB.NN=ARM NN Framework
XMC1300_Boot_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN
XMC1300_Boot_Kit.menu.LIB.DSP=ARM DSP
XMC1300_Boot_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
XMC1300_Boot_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework
XMC1300_Boot_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN

####################################################
XMC1400_Arduino_Kit.name=XMC1400 Kit for Arduino
XMC1400_Arduino_Kit.upload.tool=xmcprog
Expand Down
2 changes: 1 addition & 1 deletion libraries/SPI/src/utility/xmc_spi_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ XMC_SPI_t XMC_SPI_0 =
}
};

#elif defined(XMC1100_Boot_Kit) || defined(XMC1400_Boot_Kit)
#elif defined(XMC1100_Boot_Kit) || defined(XMC1300_Boot_Kit) || defined(XMC1400_Boot_Kit)
XMC_SPI_t XMC_SPI_0 =
{
.channel = XMC_SPI0_CH0,
Expand Down
2 changes: 1 addition & 1 deletion libraries/SPI/src/utility/xmc_spi_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typedef struct XMC_SPI
#define NUM_SPI 1
extern XMC_SPI_t XMC_SPI_0;

#elif defined(XMC1100_Boot_Kit) || defined(XMC1400_Boot_Kit)
#elif defined(XMC1100_Boot_Kit) || defined(XMC1300_Boot_Kit) || defined(XMC1400_Boot_Kit)
#define NUM_SPI 1
extern XMC_SPI_t XMC_SPI_0;

Expand Down
2 changes: 1 addition & 1 deletion libraries/Wire/src/utility/xmc_i2c_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ XMC_I2C_t XMC_I2C_1 =
.protocol_irq_service_request = 3
};

#elif defined(XMC1100_Boot_Kit) || defined(XMC1400_Boot_Kit)
#elif defined(XMC1100_Boot_Kit) || defined(XMC1300_Boot_Kit) || defined(XMC1400_Boot_Kit)
XMC_I2C_t XMC_I2C_0 =
{
.channel = XMC_I2C0_CH0,
Expand Down
2 changes: 1 addition & 1 deletion libraries/Wire/src/utility/xmc_i2c_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef struct XMC_I2C
extern XMC_I2C_t XMC_I2C_0;
extern XMC_I2C_t XMC_I2C_1;

#elif defined(XMC1100_Boot_Kit) || defined(XMC1400_Boot_Kit)
#elif defined(XMC1100_Boot_Kit) || defined(XMC1300_Boot_Kit) || defined(XMC1400_Boot_Kit)
#define NUM_I2C 1
extern XMC_I2C_t XMC_I2C_0;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "framework-arduinoxmc",
"description": "Integration of Infineon's XMC microcontrollers with the Arduino framework",
"url": "https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/",
"version": "2.0.0"
"version": "2.1.0"
}
3 changes: 3 additions & 0 deletions package/package_infineon_index.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
{
"name":"XMC1100 XMC2Go"
},
{
"name":"XMC1300 Boot Kit"
},
{
"name":"XMC1400 Kit for Arduino"
},
Expand Down
176 changes: 176 additions & 0 deletions variants/XMC1300/XMC1000_RomFunctionTable.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/*********************************************************************************************************************
* @file XMC1000_RomFunctionTable.h
* @brief ROM functions prototypes for the XMC1400-Series
* @version V1.0
* @date 08 April 2013
*
* @cond
*********************************************************************************************************************
* Copyright (c) 2013-2016, Infineon Technologies AG
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,are permitted provided that the
* following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following
* disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* To improve the quality of the software, users are encouraged to share modifications, enhancements or bug fixes with
* Infineon Technologies AG [email protected]).
*********************************************************************************************************************
*
**************************** Change history *********************************
* V1.0, 08 Jan 2013, GD, First version with XMC1000 devices
*****************************************************************************
* @endcond
*/

#ifndef ROM_FUNCTION_TABLE_H
#define ROM_FUNCTION_TABLE_H

#ifdef __cplusplus
extern "C" {
#endif

/* ***************************************************************************
******************************* Constants *******************************
*************************************************************************** */
/* Start address of the ROM function table */
#define ROM_FUNCTION_TABLE_START (0x00000100U)

/* Pointer to Erase Flash Page routine */
#define _NvmErase (ROM_FUNCTION_TABLE_START + 0x00U)

/* Pointer to Erase, Program & Verify Flash Page routine */
#define _NvmProgVerify (ROM_FUNCTION_TABLE_START + 0x04U)

/* Pointer to Request BMI installation routine */
#define _BmiInstallationReq (ROM_FUNCTION_TABLE_START + 0x08U)


/* ***************************************************************************
******************************** Enumerations ********************************
*************************************************************************** */
typedef enum TagNVMStatus
{

/* The function succeeded */
NVM_PASS = (int32_t)0x00010000U,

/* Generic error code */
NVM_E_FAIL = (int32_t)0x80010001U,

/* Source data not in RAM */
NVM_E_SRC_AREA_EXCCEED = (int32_t)0x80010003U,

/* Source data is not 4 byte aligned */
NVM_E_SRC_ALIGNMENT = (int32_t)0x80010004U,

/* NVM module cannot be physically accessed */
NVM_E_NVM_FAIL = (int32_t)0x80010005U,

/* Verification of written page not successful */
NVM_E_VERIFY = (int32_t)0x80010006U,

/* Destination data is not (completely) located in NVM */
NVM_E_DST_AREA_EXCEED = (int32_t)0x80010009U,

/* Destination data is not properly aligned */
NVM_E_DST_ALIGNMENT = (int32_t)0x80010010U,

} NVM_STATUS;


/* ***************************************************************************
*********************************** Macros ***********************************
*************************************************************************** */

/* ***************************************************************************
Description: Erase granularity = 1 Page of 16 blocks of 16 Bytes
= Equivalent to 256 Bytes using this routine.
Input parameters:
– Logical address of the Flash Page to be erased which must be page aligned
and in NVM address range
Return status:
– OK (NVM_PASS)
– Invalid address (NVM_E_DST_ALIGNMENT or NVM_E_DST_AREA_EXCEED)
– Operation failed (Error during low level NVM programming driver):
NVM_E_FAIL
NVM_E_VERIFY
NVM_E_NVM_FAIL
Prototype:
NVM_STATUS XMC1000_NvmErasePage(uint32_t *pageAddr)
*************************************************************************** */
#define XMC1000_NvmErasePage (*((NVM_STATUS (**) (uint32_t * )) \
_NvmErase))

/* ***************************************************************************
Description: This procedure performs erase (skipped if not necessary), program
and verify of selected Flash page.
Input parameter:
– Logical address of the target Flash Page, must be page aligned and in NVM
address range
– Address in SRAM where the data starts, must be 4-byte aligned
Return status:
– OK (NVM_PASS)
– Invalid addresses
NVM_E_DST_ALIGNMENT
NVM_E_SRC_ALIGNMENT
NVM_E_DST_AREA_EXCEED
NVM_E_SRC_AREA_EXCCEED
– Operation failed (Error during low level NVM programming driver):
NVM_E_FAIL
NVM_E_VERIFY
NVM_E_NVM_FAIL
Prototype:
NVM_STATUS XMC1000_NvmProgVerify(const uint32_t *srcAddr, uint32_t *dstAddr)
*************************************************************************** */
#define XMC1000_NvmProgVerify (*((NVM_STATUS (**) (const uint32_t * ,\
uint32_t * ))\
_NvmProgVerify))


/* ***************************************************************************
Description: This procedure initiates installation of a new BMI value. In
particular, it can be used as well as to restore the state upon delivery for a
device already in User Productive mode.
Input parameter:
– BMI value to be installed
Return status:
– wrong input BMI value (0x01) - only upon error, if OK the procedure triggers
a reset respectively does not return to calling routine !
Prototype:
unsigned long XMC1000_BmiInstallationReq(unsigned short requestedBmiValue)
**************************************************************************** */
#define XMC1000_BmiInstallationReq (*((uint32_t (**) (uint16_t)) \
_BmiInstallationReq))

#ifdef __cplusplus
}
#endif

#endif /* ROM_FUNCTION_TABLE_H */
Loading

0 comments on commit de8e4bd

Please sign in to comment.