EXAMPLE NAME: XMC4700_Blinky_withApps

HISTORY:
V1.0.0 initial version 

OVERVIEW: 
XMC4700/XMC4800 Blinky demo based on DAVE APPs (DAVE v4).

REQUIREMENTS:
1) "XMC4700 Relax Kit", 
   "XMC4700 Relax Lite Kit", 
   "XMC4700 Relax Kit for 5V Shields" or 
   "XMC4800 Relax EtherCAT Kit" 
2) Micro USB Cable 
3) Windows PC/Laptop installed with DAVE v4 (Version 4.1.4 or higher)

DESCRIPTION:
This blinky example is based on the easy to use DAVE APPs (DAVE v4) and flashes the led LED1 (P5.9) of the board 
with a initial periodic rate of 1.0s. Using the buttons flash rate can be adjusted in steps of 100ms. 
Use Button1 (P15.13) to increase flash rate. Use Button2 (P15.12) to decrease flash rate.
After initialization of DAVE, the button states are polled inside main loop. 
Depending on the button pressed, the cycle time of the periodic interrupt generated by TIMER is
increased or decreased. During interrupt of TIMER the state of LED output port is toggled.

Source structure:
1)main.c          Configuration and initialization of modules.
                  Poll buttons inside main loop and configure CCU4 cycle time accordingly.
				  Implement ISR to toggle LED1.

Following DAVE APPs (DAVE v4) are used:
1)TIMER           Purpose:  Configure and control of the CCU4 to generate event with an initial cycle time of 1.0s.
                  settings: TAB "General settings"
                            Selected timer module: CCU4
                            Timer interval[usec]:  1000000
                            Start after initialization selected
2)INTERRUPT       Purpose:  Interrupt which is connected to the event generated by TIMER App.
                  settings: TAB "interrupt settings"
                            Enable interrupt at initialization selected
                            Interrupt Handler: UserURQHandler
3)DIGITAL_IO      Purpose:  Input port connected to BUTTON1.		
                  Name:     "BUTTON1"
                  settings: TAB "General settings"
                            Pin direction:         Input
                            Input Settings Mode:   Tristate
4)DIGITAL_IO      Purpose:  Input port connected to BUTTON2.		
                  Name:     "BUTTON2"
                  settings: TAB "General settings"
                            Pin direction:         Input
                            Input Settings Mode:   Tristate
5)DIGITAL_IO      Purpose:  Output port connected to LED1.		
                  Name:     "LED1"
                  settings: TAB "General settings"
                            Pin direction:         Input/Output
                            Output Settings Mode:  Push Pull
                            Initial ouput level:   Low
                            Driver strength:       Don't care

Manual Pin Allocator settings:
1)BUTTON1          pin     --> #49 P15.13
2)BUTTON2          pin     --> #50 P15.12
3)LED1             pin     --> #57 P5.9

BUILD:
Please note, the project has to be rebuild after importing because the build result folder 
has been deleted to reduce the size.
1) Import the project
2) Build and flash the application to the device using USB X101 connection

SETUP:
1) Connect Micro USB cable to Relax Kit USB plug X101 and to a PC/laptop.

HOW TO TEST:
1) After reset.
   OBSERVATION: LED1 is toggled (on/off) with a cycle time of 1.0s 
2) Push BUTTON1 to decrease cycle time to a minimum of 0.1s.
   OBSERVATION: On/off cycle time of LED1 on port P5.9 is decreased.
3) Push BUTTON2 to increase cycle time to a maximum of 1.5s.
   OBSERVATION: On/off cycle time of LED1 on port P5.9 is increased.