EXAMPLE NAME: XMC4700_UART_Shell_withApps

HISTORY:
V1.0.0 initial version 

OVERVIEW: 
XMC4700/XMC4800 UART demo including a shell based on DAVE APPs (DAVE v4).

REQUIREMENTS:
1) "XMC4700 Relax Kit" or
   "XMC4700 Relax Lite Kit" or 
   "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 UART example is based on the easy to use DAVE APPs (DAVE v4) and initializes the UART with 19200baud, 
8 data bits, 1 stop bit, no parity.
Using the UART APP a small shell is implemented which allows you to control LED1/LED2 state with some
simple commands.

Source structure:
1)main.c         configuration and initialization of modules
                 start timer with cycle time of 10ms and register callback into shell
                 show help during startup and first prompt
2)Shell.c        implement callback which listens on UART for new data
                 parse the commands received from UART
                 call and implement the commands (toggling of LEDs, show help)

Following DAVE APPs (DAVE v4) are used:
1)UART           Purpose:  Implement, configure and control the UART driver
                 settings: TAB "General settings"
                           Desired speed [baud]:  19200
                           Data bits:             8
                           Stop bit:              1 Stop Bit
                           Parity selection:      No Parity
					 	   TAB "Advanced settings"
					 	   Transmit mode:         Direct
					 	   Receive mode:          Direct
2)SYSTIMER       Purpose:  Provides timers on which callbacks can be registered. Used
                           to create timer for cyclic calls into shell.
3)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
4)DIGITAL_IO     Purpose:  Output port connected to LED2
                 Name:     "LED2"          
                 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:
1)UART_0         receive pin  --> #108 P1.4
2)UART_0         transmit pin --> #107 P1.5
3)LED1           pin          --> #57  P5.9
4)LED2           pin          --> #58  P5.8

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.
2) Check inside the "Computer Management/Device manager" on your PC/Laptop on which
   COM port the "JLink CDC UART Port" appears.
3) Open a terminal (e.g. putty) select the COM port observed inside step 2 and configure
   the serial/UART connection with these parameters: 
     Speed [baud]:     19200
     Data bits:        8
     Stop bit:         1 Stop Bit
     Parity selection: No Parity

HOW TO TEST:
1) After reset
   OBSERVATION: LED1, LED2 is off. Inside terminal the help message appears showing the
   available commands
2) Enter command "l1"
   OBSERVATION: LED1 toggles into on state
3) Enter command "l2"
   OBSERVATION: LED2 toggles into on state
4) Enter command "LED 1 off"
   OBSERVATION: LED1 switched into off state
5) Enter command "?"
   OBSERVATION: help appears
   
