The XMC Peripheral Library (XMC Lib) consists of low-level drivers for the XMC product family peripherals.
Built on top of the Cortex Microcontroller Software Interface Standard (CMSIS), it provides access to all peripheral features.
The following 32-Bit Industrial Microcontrollers based on ARM Cortex-M4F are supported:
The following toolchains are supported:
XMC Lib consists of routines and data structures which cover all peripheral functions.
It provides a peripheral register abstraction by a set of stateless APIs. It is possible to write a full application without a single peripheral register access.
It is built on top of Cortex Microcontroller Software Interface Standard (CMSIS).
This section describes the set of coding rules and conventions applied to the XMC Peripheral Library:
XMC Peripheral Library follows an object oriented approach, where instances of peripherals are treated as objects = attributes + functions.
Attributes are the peripheral data structures defined in device header file. These gets configured using configuration data structures using initialization functions.
Peripheral functions take a pointer to the peripheral data struct as the first argument.
XMC Peripheral Library uses naming conventions to bind the data struct and the functions that operate on i, i.e. XMC_PERI_DoSomething(XMC_PERI_t const *peri, ...);
Typically a driver contains the following functionality:
A peripheral driver is structured as:
If needed the family extension API implementation file, i.e. xmc4_gpio.c, can also overload common functionality to adapt it to target device. The peripheral driver abstracts the target device, helping the user in code porting to another family or device.
The following steps are required:
The selection of the target device is done through preprocessor macro, i.e. -DXMC4500_F144x1024 (refer to devices names below)
XMC4800 Series device names:
XMC4700 Series device names:
XMC4500 Series device names:
XMC4400 Series device names:
XMC4300 Series device names:
XMC4200 Series device names:
XMC4100 Series device names:
The following diagram shows the most important directories and files provided in the distribution.
* mtb-xmclib-cat3 - XMClib root directory * +-- CMSIS/Infineon - Includes device header files, system and startup files * +-- Newlib - C standard library implementation intended for use on embedded systems * +-- XMCLib - XMC Peripheral Library API root directory * │ +-- doc - Doxygen configuration files to generate documentation * │ +-- inc - XMC Peripheral Library API interface files * │ +-- src - XMC Peripheral Library API implementation files * +-- device-info - Configuration files that defines a resource behavior for ModusToolbox Device Configurator * +-- docs - XMC Peripheral Library documentation generated with Doxygen * │ +-- xmc1_api_reference_manual.html - XMC Peripheral Library documentation with XMC1 specific information * │ +-- xmc4_api_reference_manual.html - XMC Peripheral Library documentation with XMC4 specific information * +-- props.json - Device description file for ModusToolbox Device Configurator * +-- README.md - Description of the library * +-- RELEASE.md - Description of the changes in the release
The XMC Lib examples could be found at https://github.com/Infineon/Code-Examples-for-ModusToolbox-Software
Create the project and open it using one of the following:
For more details, see the Eclipse IDE for ModusToolbox User Guide
ModusToolbox provides the Project Creator as both a GUI tool and a command line tool to easily create one or more ModusToolbox applications. See the "Project Creator Tools" section of the ModusToolbox User Guide for more details.
Alternatively, you can manually create the application using the following steps:
make getlibs
command.Various CLI tools include a -h
option that prints help information to the terminal screen about that tool. For more details, see the ModusToolbox User Guide.
Compilers used :
License Terms and Copyright Information
Copyright (c) 2015-2024, Infineon Technologies AG All rights reserved.
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:
The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To improve the quality of the software, users are encouraged to share modifications, enhancements or bug fixes with Infineon Technologies AG at XMCSu. ppor t@inf ineo n.com
Legal Disclaimer The information given in this document shall in no event be regarded as a guarantee of conditions or characteristics. With respect to any examples or hints given herein, any typical values stated herein and/or any information regarding the application of the device, Infineon Technologies hereby disclaims any and all warranties and liabilities of any kind, including without limitation, warranties of non-infringement of intellectual property rights of any third party.
Information For further information on technology, delivery terms and conditions and prices, please contact the nearest Infineon Technologies Office (www.infineon.com).
Warnings Due to technical requirements, components may contain dangerous substances. For information on the types in question, please contact the nearest Infineon Technologies Office. Infineon Technologies components may be used in life-support devices or systems only with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered.