It’s Relax Time: LED PWM

In the previous posting, we haven’t use DAVE CE application. Now, let’s start use it!!
We will make an application, still base on LED, but we will control the LED with PWM (Pulse Width Modulation) signal. Then we can control the brightness of the LED.

Just create new project and choose DAVE CE Project.

ADDING PWMSP001 APPLICATION

DAVE CE application, allows us to use component based program. The component actually is the library provided by DAVE IDE. When we want to create PWM application, we can use PWMSP001,  the component to generate PWM signal base on CCU4 (Capture/Compare Unit 4). CCU4 consists of 4 16-bit timer. And can be concatenated to generate 32, 48 or 64 bit timer. To use this component, also others component, can be select from App Selection View. Double click PWMSP001 to add to our project. We will use 2 PWM, so do it twice..:).

When we add the second PWMSP001, DAVE will show App Sharability dialog, because PWMSP001 use CCU4, so DAVE will ask to create new instance for CCU4 or use the same CCU4 (share/Existing Apps). Just select use Existing Apps, by click  app/ccuglobal/0.

We will have 2 PWMSP001 (PWMSP001/0 and PWMSP001/1) application on App Dependency Treeview with the same CCU4 (CCU4GLOBAL/0). If we select new instance, PWMSP001/1 will use new CCU4, CCU4GLOBAL/1.

UI EDITOR

Let start to initialize 2 PWM applications. Right click on the application and click UIEditor.

UIEditor also can be display by double click the application from S/W App Connectivity View.

The configure the both PWM application as below:

  • Counting Mode: Edge-Aligned Mode
  • Check Start during initialization
  • CCU4 resolution : 10uSec (10000 nsec)
  • PWM freq: 200 Hz
  • Duty Cycle: 0 % (First time LED off)
  • Check Period Match (check Enable at initialization)

The CCU4GLOBAL use default setting (with PLL, frequency  120 MHz).

MANUAL PIN ASSIGNMENT

PWM application need to output the signal to one of MCU pin. Then we need to assign a pin for our PWM applicaion, 2 pin for 2 PWM application. As we know that Relax Kit has 2 LEDs, then we can assign these LEDs for our PWM applicaion. Right click from our application then select Manual Pin Assignment.

Select pin_directouput from Resource, and from Port-Pin/Pin Number select P1.0 and P1.1 for each application. Then click Solve And Save. OK, we’ve done the setting for our application. If we want use, example, interrupt we must add interrupt controller application  (NVIC), and we must connect it to the PWM application using Signal Connection. For now we will not use interrupt.

Next step is to generate the code from application setting, click SOLVER and Generate Code. DAVE will generate source code base on application setting. Every time we change the setting, Solver and Generate Code must be done.

Off course that the generated code by DAVE still need to edit. Just like when we make a PC program by visual programming language, like Delphi. We just do to set windows appearance by set the visual properties from the component we used. When we run the program, there is nothing happen if we click a button without a code in the click event handler.

PWMPS001 FUNCTIONS

DAVE has a good documentation from its help. Just click Help->Help Content. When help come out select Dave Apps then click PWMSP001.

 

The API Documentation, will show the functions for PWMSP001. The functions will control the PWMSP001 application: start or stop PWM. set PWM frequency, change duty cycle, etc. What we’ve done before was to configure the PWMSP001 application in design time. And the code that we will make is to configure/control it in run time.

PWM PROGRAM

We will make a program to adjust the LED brightness by PWM signal. After power ON, both LED will be off, duty cycle 0%, then PWMSP001/0 duty cycle will be increased to 100% with 25 mS interval. Interval time come from delay function using System Tick Timer. After 100%, PWMSP001/1 will be configure in the same way. Next is to decrease the duty cycle back to 0%.

And here is the program:

/*
* Main.c
*
* Created on: Dec 16, 2012
* Author: Kang Usman
*/

#include <DAVE3.h> //Declarations from DAVE3 Code Generation (includes SFR declaration)

uint32_t ticks = 0UL;

void SysTick_Handler(void);
void delayms(uint32_t thedelay);

int main(void)
{
  status_t status; //declaration of return variable for DAVE3 APIs
  uint32_t PWMerrorcount = 0; // accumulation of number of not successful executed API for the PWMSP001 App
  uint32_t PWMerrorcount2 = 0; // accumulation of number of not successful executed API for the PWMSP001 App
  int i;

  DAVE_Init(); // Initialization of DAVE Apps
  SysTick_Config(SystemCoreClock / 1000UL);

  status = PWMSP001_Start(&PWMSP001_Handle0); // start of the PWMSP001 App, instance 0
  if (status != DAVEApp_SUCCESS) PWMerrorcount++; // if start was not successful PWM error counter incremented
  status = PWMSP001_Start(&PWMSP001_Handle1); // start of the PWMSP001 App, instance 0
  if (status != DAVEApp_SUCCESS) PWMerrorcount2++; // if start was not successful PWM error counter incremented

  while(1)
  {
    for(i=0;i<101;i+=5)
     {
       status = PWMSP001_SetDutyCycle(&PWMSP001_Handle0, i); //change brightness of LED
       if (status != DAVEApp_SUCCESS) PWMerrorcount++; //if set of new duty cycle was not successful
       delayms(25);
     }

   for(i=0;i<101;i+=5)     {       status = PWMSP001_SetDutyCycle(&PWMSP001_Handle1, i); //change brightness of LED       if (status != DAVEApp_SUCCESS) PWMerrorcount2++; //if set of new duty cycle was not successful       delayms(25);     }    for(i=100;i>=0;i-=5)
    {
      status = PWMSP001_SetDutyCycle(&PWMSP001_Handle0, i); //change brightness of LED
      if (status != DAVEApp_SUCCESS) PWMerrorcount++; //if set of new duty cycle was not successful
      delayms(25);
    }

   for(i=100;i>=0;i-=10)
    {
      status = PWMSP001_SetDutyCycle(&PWMSP001_Handle1, i); //change brightness of LED
      if (status != DAVEApp_SUCCESS) PWMerrorcount2++; //if set of new duty cycle was not successful
      delayms(25);
    }

  }
 return 0;
}

void SysTick_Handler(void)
{
  ticks++;
}

void delayms(uint32_t thedelay)
{
  uint32_t currenttick;

  currenttick= ticks;
  while(ticks-currenttick<thedelay);
}

And here is the video…

 

It’s Relax Time: Button Read

In the previous posting, we’ve learn how to make a program using DAVE IDE from zero. We have to understand the registers that we used in the program, without library, so we have to read the reference manual of XMC4500. I think it is good for beginner, like me. So, we didn’t depend on the library from the IDE. Or if the library didn’t match with what we want, we can make our own library. 🙂

Now, let’s start to use DAVE advance features. Just create a new project (Dave Poject), choose Easy Start Project.

Then open Main.c.

/* SFR declarations of the selected device */
#include <XMC4500.h>
#include "GPIO.h"

void SysTick_Handler(void);

typedef enum { OFF = 0, ON = 1} state_t ;
state_t led1_state = ON;
state_t led2_state = ON;

int main(void) {
/* Initialize LED1 */
 P1_1_set_mode(OUTPUT_PP_GP);
P1_1_set_driver_strength(STRONG);

/* Initialize LED2 */
P1_0_set_mode(OUTPUT_PP_GP);
P1_0_set_driver_strength(STRONG);

/* Initialize BUTTON1 */
P1_14_set_mode(INPUT);

/* Initialize BUTTON2 */
P1_15_set_mode(INPUT);

/* fSYS=fCPU at 120MHz */
/* Systick every 120000 cycles = 10ms */
if(SysTick_Config(SystemCoreClock / 100UL) == 0){

/* Loop forever */
for(;;) {
}
}
else{
asm("BKPT 255");
}
}

void SysTick_Handler(void) {
static uint32_t ticks = 0UL;
static state_t button1_state = OFF;

static state_t button2_state = OFF;
ticks++;

/* Read BUTTON1, update state if pressed */
if(P1_14_read() == 0UL){
 button1_state = ON;
}
else{
 if(button1_state == ON){
 if(led1_state == ON){
  led1_state = OFF;
}
else{
led1_state = ON;
}
}
button1_state = OFF;
}

/* Read BUTTON2, update state if pressed */
if(P1_15_read() == 0UL){
button2_state = ON;
}
else{
if(button2_state == ON){
if(led2_state == ON){
led2_state = OFF;
}
else{
led2_state = ON;
}
}
button2_state = OFF;
}

/* Toggle every 1s */
if(ticks == 100UL){
if(led1_state == ON){
/* Toggle LED1 */
P1_1_toggle();
}

if(led2_state == ON){
/* Toggle LED2 */
P1_0_toggle();
}
ticks = 0UL;
}
}

Check the program, there is no register name!. Yeah, it’s already write in “GPIO.h”. We just call the function. As we know that there are 2 LED in Relax Kit that connected to P1.0 and P1.1, and also there are 2 buttons connected to P1.14 and P1.15. To initialize P1.0 and P1.1 as output with strong driver mode we will write

/* Initialize LED1 */
P1_1_set_mode(OUTPUT_PP_GP);
P1_1_set_driver_strength(STRONG);

/* Initialize LED2 */
P1_0_set_mode(OUTPUT_PP_GP);
P1_0_set_driver_strength(STRONG);

And P1.14 and P1.15:

 /* Initialize BUTTON1 */
P1_14_set_mode(INPUT);

/* Initialize BUTTON2 */
P1_15_set_mode(INPUT);

The program also use System Tick Timer at 10 ms.

But, I will make a change. The program will be changed to blink the LED, and we can adjust the blink rate by push the button, increase and decrease. System tick timer will be set to 1 ms. LED toggle in system tick timer interrupt handle, and the main program will poll/scan the 2 buttons, if Button1 (P1.14) is pressed, the thedelay value will be add by 10, then the LED will blink 10 ms slower. And if Button2 (P1.15) is pressed, the thedelay value will minus by 10, and the LED will blink 10 ms faster.

And here is the souce code..


/* SFR declarations of the selected device */

#include <XMC4500.h>

#include "GPIO.h"

void SysTick_Handler(void);
void delayms(uint32_t delay_ms);

uint32_t thedelay;
uint32_t ticks = 0UL;
uint32_t currentticks;

int main(void) {

/* Initialize LED1 */
P1_1_set_mode(OUTPUT_PP_GP);
P1_1_set_driver_strength(STRONG);

/* Initialize LED2 */
P1_0_set_mode(OUTPUT_PP_GP);
P1_0_set_driver_strength(STRONG);

/* Initialize BUTTON1 */
P1_14_set_mode(INPUT);

/* Initialize BUTTON2 */
P1_15_set_mode(INPUT);

thedelay= 500;
ticks=0;
currentticks=ticks;

/* fSYS=fCPU at 120MHz */
/* Systick every 120000 cycles = 1ms */
SysTick_Config(SystemCoreClock / 1000UL);

while(1)
{
   if(P1_14_read()== 0UL)
    {
      delayms(100);  //Anti debounce
      while(P1_14_read()==0UL); //Wait until button released
      thedelay+=10;
      if(thedelay>1000)
         thedelay=1000;
    }

  if(P1_15_read()== 0UL)
   {
     delayms(100);
     while(P1_15_read()==0UL);
     thedelay-=10;
     if(thedelay<;10)
       thedelay=10;
   }
}
}

void delayms(uint32_t delay_ms)
{
  uint32_t currenttick;

  currenttick=ticks;
  while(ticks-currenttick<delay_ms);
}

void SysTick_Handler(void) {

 ticks++;
 if(ticks-currentticks>=thedelay)
 {
   P1_0_toggle();
   P1_1_toggle();
   currentticks=ticks;
 }
}

And check the video

It’s Relax Time: Blinky LED

OK, let’s start to play with the Relax Kit. It’s Relax Time… 🙂

Let’s start with the simplest thing…just blink the LED, just say hello to the world. Relax Kit has 2 LED connected to P1.0 and P1.1. Here is the schematic:

With this connection, we need to give logic HIGH the pin if want to turn on the LED, and logic LOW if want to turn off the LED.

PORT CONFIGURATION

Before we can use the port, we have to do some configuration to the related registers. Not like standard C51 family, that no need to set a register before read or write to the port. But, off course, we can not set mode for C51 port, like open drain, push pull etc. Only has internal pull up.

There are 8 registers to configure XMC4500 port:

  • Port Input/Output Control Register (IOCR)
  • Pad Drive Mode Register (PDR)
  • Pin Function Decision Control Register (PDISC)
  • Port Output Register (OUT)
  • Port Output Modification Register (OMR)
  • Port Input Register (IN)
  • Port Pin Power Save Register (PPS)
  • Port Pin Hardware Select Register (HWSEL)

IOCR will set a port as standard input/output or alternative function. As input port, it can the port can be set as direct input or inverted input, with or without internal pull up/down. For output function, we can set output mode as push pull or open drain. The port also can be configured as alternative function in output mode, like PWM outputm clock output etc.

There are 4 registers of  IOCR:

  • IOCR0: controls pin [3:0]
  • IOCR4: controls pin [7:4]
  • IOCR8: controls pin [11:8]
  • IOCR12: controls pin [15:12]

XMC4500 has 8 ports: P0, P1, P2, P3, P4, P5, P6, P14, and P15. Each ports can have until 16 pin (bit), depends on the XMC4500 package. Detail in the XMC manual.

IOCR0 structure (others are the same)

PC0, for pin 0, PC1 for pin 1 and so on, rw can be read or write, r read only bit and bit with 0 value should write 0.

And the input/output configuration:

PDR is used to select output drive strength and the slew rate.

There are 2 PDR registers: PDR0 (for bit 0-7) and PDR1 (for bit 8-15). PDR0 is used for P0-P6, and  PDR1 only use for P0-P3 and P5, the port that has more than 8 pin. P14 dan P15, that use for analog analog, did not have PDR. PDRx register structure:

The primary use for PDSIC register is to disable/enable the digital pad structure in shared analog and digital ports, see the dedicated description of the Pn_PDISC (n=14-15) register of the analog ports. PDSIC structure:

OUT register determines the value of a GPIO pin when it is selected by Pn_IOCRx as output. Writing a 0 to a Pn_OUT.Px (x = 0-15) bit position delivers a low level at the corresponding output pin. A high level is output when the  corresponding bit is written with a 1. Note that the bits of Pn_OUT.Px can be individually set/reset by writing appropriate values into the port output modification register Pn_OMR, avoiding readmodify-write operations on the Pn_OUT, which might affect other pins of the port. The Pn_OUT is also used to store/drive a defined value for the input in Deep Sleep mode. For details on this see the Port Pin Power Save Register. That is also the only use of the Pn_OUT register in the analog and digital input ports P14 and P15.

OMR register contains control bits that make it possible to individually set, reset, or toggle the logic state of a single port line by manipulating the output register.

To select for each pin, PSx bit and PRx bit can be programmed as below:

PPS registers is used for power save or sleep mode, detail information can be read from XMC4500 manual, also for HWSEL register. 🙂

BLINKY LED

OK, let’s start to make a program. In this program we will just to blink both of LED on the Relax Kit board, when P1.0 turned ON, P1.1 will turned OFF and vice versa.

We will set P1.0 and P1.1 as output with push pull mode. PC0 in IOCR0 will has value 10000B. In C we can write as:

  PORT1->IOCR0 = 0x80UL << 0; //P1.0 output, push pull   
  PORT1->IOCR0|= 0x80UL << 8; //P1.1 output, push pull   

PDR register is set to select strong driver, PD0 and PD1 will set to 2.

  PORT1->PDR0 = 0x02UL << 0; //P1.0, pad driver strong   
  PORT1->PDR0 |= 0x02UL << 8; //P1.1, pad driver strong   

To turn ON and turn OFF the LED, we will not use OUT reguster, but we will use OMR register, because we will control per pin. Set PRx=0 and PSx=1 will turn on the LED, and PRx=1 and PSx=1 will turn off the LED.

LED ON:

PORT1->OMR = (1UL<<0)|((1UL<<0)<<16); // P1.0 ON
PORT1->OMR = (1UL<<1)|((1UL<<1)<<16); // P1.1 ON

LED OFF:

PORT1->OMR = (1UL<<0)<<16; // P1.0 OFF
PORT1->OMR |=(1UL<<1)<<16; //P1.1 OFF

Then, make a new project with DAVE IDE, and select Empty Main Project:

And write this in main.c and build the project.

#include  //SFR declarations of the selected device
void thedelay (unsigned long delay)
{
  while (delay–)
  {
    __NOP();
  }
}

int main(void)
{
  PORT1->IOCR0 = 0x80UL << 0; //P1.0 output, push pull   
  PORT1->IOCR0|= 0x80UL << 8; //P1.1 output, push pull   
  PORT1->PDR0 = 0x02UL << 0; //P1.0, pad driver strong   
  PORT1->PDR0 |= 0x02UL << 8; //P1.1, pad driver strong   
  
  while(1)    
    {
      PORT1->OMR = (1UL<<0)|((1UL<<0)<<16); // P1.0 ON
      PORT1->OMR |=(1UL<<1)<<16; //P1.1 OFF
      thedelay(4000000);
      PORT1->OMR = (1UL<<0)<<16; // P1.0 OFF
      PORT1->OMR = (1UL<<1)|((1UL<<1)<<16); // P1.1 ON
      thedelay(4000000);
   }
  return 0;
}

DOWNLOAD AND DEBUGGING

Connect the Relax Kit with the PC/Laptop. If we installed J-Link driver when installing DAVE 3, PC/Laptop will detect it. Just click Debug button/menu.

If BlinkyLED didn’t appear in the debugger, just compile and build our project before start download or debugging. If present, just click BlinkyLED. Select Infineon XMC Relax Kit as target. Then click Debug button. DAVE will download the program into flash memory of XMC4500. After that will show debug window:

From Debug window, click Resume(F8) to run the program. We also can run the program step by step  (Step Into), step Over, or step return, reset the target and inspect the value of declared variables on the program, register value, and the program in assembly.

Check out the video:

XMC4500 Development Tool: DAVE™ 3 – Auto Code Generation and Free Tools

DAVE™ 3 is an Integrated Development Tool (IDE) made by Infineon, Eclipse based with code editor, debugger,loader and use free ARM-GCC C Compiler. DAVE™ has special feature Code Engine (CE), an automatic code generator, designed to support Componen Based Programming (CBP) for embedded system. Same as Code Wizard in AVR Code Vision. With CBP, maybe we no need to read every page the XM4500 reference manual (1615 pages :). But, off course, we still need to understand the basic principal of all XMC4500 features. But we no need to remember all bit or register name.

DAVE™ INSTALLATION

DAVE™ is a free tool from Infineon, it can be download from here. Current version is 3.1.4 Beta Realease. Just unzip download file and run DAVE-3.1.4_Master_Setup.exe. Follow installation instruction. Just click Next. 🙂

daveinstall1

SEGGER-JLinkARM_V456 is integrated debugger with DAVE™ 3, used for program download and debugging. When in our PC have another IDE that support jLink plug in, will be an option whether to install it in IDE or not.

jlink

I already try in Keil to download program to Relax Kit. For AVR studio, need another debugger tool that support AVR.

When installation finish, if we run, DAVE™ 3 will ask to select Workspace folder, where the projects will be saved. Just go to desired folder by click Browse button. Select Use this as the default… so DAVE™ 3 will not ask again v.

workspace

DAVE™ 3 APPLICATION AND LIBRARY INSTALLATION

To use DAVE CE features,we need to install the needed libraries for create DAVE CE application. Make sure we connected to internet. From Help menu, click Install App Library.

installlibrary

Will show up Library Manager Wizard.

daveappslibrary

Select Dave Project Library Manager to download program samnples or Dave Apps Library Manager to download the DAVE CE library. Just follow the next instruction. If download failed, try to change connection setting. Just click Window>Preference. From General>Network Connection. Select Active Provider>Direct.

preferences

If still fail, we can install manually. Download .

Program Samples

DAVE Apps

Enjoy it…

XMC4500 Development Tool: The Relax Lite Kit

Relax Lite Kit, is an evaluation board from Infineon as development tool to learn XMC4500 microcontroller, an ARM Cortex M4 processor core. The Relax Lite Kit is downgrade version of The Relax Kit with reduce some feature like Ethernet, Micro SD, RTC crystal, Quad-SPI flash memory.

relax-lite-kit

MAIN FEATURES

  • XMC4500 Microcontroller (ARM® Cortex™-M4F based)
  • Detachable on-board Debugger
  • Power over USB
  • 2 x User Button and 2 x User LED
  • Reset Button
  • Power Regulator from 5 V to 3.3V
  • 4 x SPI-Master, 3x I2C, 3 x I2S, 3 x UART, 2 x CAN, 17 x ADC (12 bit), 2 x DAC, 31x PMW mapped on 2 Pin Headers 2 x 20
  • USB-OTG (Micro USB Plug)

Relax Kit version that not include in Lite version:

  • Ethernet PHY and RJ45 jack
  • Real Time Clock Crystal
  • 32 Mbit Quad-SPI Flash Memory
  • microSD Card Slot

 POWER SUPPLY

Relax Kit must be supplied by an external power supply (5V) connected to any of the Micro UBS plugs (X3, X100). There are 2 micro USB plugs, micro USB plug for debugger board and micro USB OTG. Both V-USB use protection diode, that ensure safe operation in case power is provided through both USB plugs at the same time.

powersupply

 

Standard USB only can draw 500 mA current, so it need an external power supply if the Relax Kit connected with other circuit that need current higher than 500 mA. Out of the box with the pre-programmed web server application and the on-board debugger in operation the XMC4500 Relax Kit-V1 typically draws about 250 mA. The XMC4500 Relax Lite Kit-V1 without the web server capabilities draws about 200 mA. The external power supply can be connected to to one of the 5 Volt power pins (VDD5) on the pin headers X1 or X2. If the board is powered via a USB plug, it’s not recommended to apply an additional 5 Volt power supply because no protection diode. So if the circuit need current more than 500 mA just use external power supply to pin header X1 or X2.

PIN HEADER CONNECTOR

The pin headers X1 and X2 can be used to extend the evaluation board or to perform measurements on the XMC4500. Figure below shows the available GPIOs/signals at the pin headers. The pinning table is also printed onto the bottom side of the PCB.

pinheader

The XMC4500 provides a flexible mapping of functions to different pins. Figure below shows an example how the communication peripheral functions UART, I2C, SPI, CAN and I2S can be mapped to XMC4500’s GPIOs.
GPIOs with the same colour code belong to the same group of physical pins and cannot be choosen twice. For instance UART-3 has got a pin overlap with I2C-Master1 and therefore this combination cannot work in parallel.
Please also avoid pheripheral combinations which are using the same USIC channel. For example I2C-Master2 and UART-3 utilizing USIC 0 Channel 0 (U0C0), therefore this combination does not work in parallel.

pinmapping

Detail explanation just refer to The Relax Kit manual.

XMC4500: An Introduction (ARM Cortex M4 from Infineon)

A few weeks ago, I met Infineon Marketing on Facebook. After a little conversation, he would like to give me an evaluation kit from Infineon,  for free. 🙂 The kit is powered by XMC4500 microcontroller, with ARM Cortex M4. Before we talk about the kit, let’s meet with XMC4500.

XMC4500 ARCHITECTURE

XMC4500 series belongs to the XMC400 family, based on ARM Cortex M4 processor core. The XMC4500 series devices are optimized for electrical motor control, power conversion, industrial connectivity and sense & control applications. Here is some main features of XMC4500, detail explanation should refer to XMC refence manual.

CPU Subsystem

CPU Core:

  • High Performance 32-bit ARM Cortex-M4 CPU
  • 16-bit and 32-bit Thumb2 instruction set
  • DSP/MAC instructions
  • System timer (SysTick) for Operating System support

Floating Point Unit

Memory Protection Unit

Nested Vectored Interrupt Controller (NVIC)

Two General Purpose DMA with up to 12 channels

Event Request Unit (ERU) for programmable processing of external and internal
service requests

Flexible CRC Engine (FCE) for multiple bit error detection

On-Chip Memories

  • 16 KB on-chip boot ROM
  • 64 KB on-chip high-speed program memory
  • 64 KB on-chip high speed data memory
  • 32 KB on-chip high-speed communication
  • 1024 KB on-chip Flash Memory with 4 KB instruction cache

Communication Peripheral

  • Ethernet MAC module capable of 10/100 Mbit/s transfer rates
  • Universal Serial Bus, USB 2.0 host, Full-Speed OTG, with integrated PHY
  • Controller Area Network interface (MultiCAN), Full-CAN/Basic-CAN with three nodes, 64 message objects, data rate up to 1 Mbit/s
  • Six Universal Serial Interface Channels (USIC), usable as UART, double-SPI, quad-SPI, IIC, IIS and LIN interfaces
  • LED and Touch-Sense Controller (LEDTS) for Human-Machine interface
  • SD and Multi-Media Card interface (SDMMC) for data storage memory cards
  • External Bus Interface Unit (EBU) enabling communication with external memories
  • and off-chip peripherals like SRAM, SDRAM, NOR, NAND and Burst Flash.

Analog Fronted Peripherals

  • Four Analog-Digital Converters (VADC) of 12-bit resolution, 8 channels each with input out-of-range comparators for over-voltage detection
  • Delta Sigma Demodulator with four channels, digital input stage for A/D signal conversion
  • Digital-Analogue Converter (DAC) with two channels of 12-bit resolution

Industrial Control Peripherals

  • Four Capture/Compare Units 4 (CCU4) for use as general purpose timers
  • Two Capture/Compare Units 8 (CCU8) for motor control and power conversion
  • Two Position Interfaces (POSIF) for hall and quadrature encoders and motor positioning
  • Window Watchdog Timer (WDT) for safety sensitive applications
  • Die Temperature Sensor (DTS)
  • Real Time Clock module with alarm support
  • System Control Unit (SCU) for system configuration and control

Input/Output Lines

  • Programmable port driver control module (PORTS)
  • Individually bit addressable
  • Tri-stated in input mode
  • Push/pull or open drain output mode
  • Boundary scan test support over JTAG interface

On Chip Debug Support

  • Full support for debug features: 8 breakpoints, CoreSight, trace
  • Various interfaces: ARM-JTAG, SWD, single wire trace

Block Diagram

The diagram below shows the functional blocks and their basic connectivity within the
XMC4500 System.

xmcblockdiagram

DEVELOPMENT TOOL

Some compiler & tool chain that support XMC4500:

For the evaluation board we can use:

And here is the evaluation kit that I received:

relaxkit1

relaxkit2

relaxkit3

The kit that I received is Lite version kit, with some features not include: Ethernet, micro SD card and qSPI Flash. But it’s not a big problem, maybe someday I’ll buy the missing component and insert to the kit. And we will use DAVE from Infineon as it’s free download from Infineon web. But we also can use Keil MDK, we have to buy it for professional use. The lite version only support 32KB flash, it’s enough to blink the LED. 🙂