Hello everyone,

I'm still struggling with the UART(printf() style debugging).
I want to setup an UART connection using the XMClib( NO Dave APPS)
I found an UART example for the XMC1200 kit(UART_XMC_Lib_XMC12), i tried to adapt the example to the XMC4200 series but still there is no output.
Will i be able to see the output in dave or do i need another program(TeraTerm) to see the output?
In the example, the TX pin is configured as XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT7. i'm unable to use ALT7 so i used ALT4, does this makes any difference?
Code:
/* SFR declarations of the selected device */
#include <XMC4200.h>
#include "GPIO.h"
#include <xmc_uart.h>
#include <xmc_gpio.h>


#define UART_RX P1_4
#define UART_TX P1_5
#define LED1 P2_1
#define KNOP1 P14_7
#define TICKS_PER_SECOND 10000
#define TICKS_WAIT 1000
const uint8_t message[] = "hello world\n";



/*UART CONFIG*/
const XMC_UART_CH_CONFIG_t uart_config =
{
		.data_bits = 8U,
		.stop_bits = 1U,
		.baudrate = 115200
};


unsigned long timingdelay, adc_result;

void ADC0_Init(void);
void Delay100US (unsigned long time);
void SysTick_Handler(void);

int main(void) {

	/* Setup the system timer to tick every 100us */
	SysTick_Config(SystemCoreClock / TICKS_PER_SECOND);

	/*conf uart channel */
	XMC_UART_CH_Init(XMC_UART0_CH0, &uart_config);
	XMC_UART_CH_SetInputSource(XMC_UART0_CH0, XMC_UART_CH_INPUT_RXD, USIC0_C0_DX0_P1_4);

	/*start uart channel*/
	XMC_UART_CH_Start(XMC_UART0_CH0);

	/*config pins */

	XMC_GPIO_CONFIG_t configTX;
	configTX.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT4;/*must be ALT7?????*/
	XMC_GPIO_Init(UART_TX, &configTX);

	XMC_GPIO_CONFIG_t configRX;
	configRX.mode = XMC_GPIO_MODE_INPUT_TRISTATE;
	XMC_GPIO_Init(UART_RX, &configRX);

	/*XMC_GPIO_SetMode(UART_TX,XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT4); must be alt7???*/
	/*XMC_GPIO_SetMode(UART_RX,XMC_GPIO_MODE_INPUT_TRISTATE );*/
	/*XMC_GPIO_SetMode(LED1, XMC_GPIO_MODE_OUTPUT_PUSH_PULL);*/
	/*XMC_GPIO_SetMode(P14_7,XMC_GPIO_MODE_INPUT_TRISTATE);*/ /*doesn't work for pushbutton?*/

	XMC_GPIO_CONFIG_t configOUTPUT;
	configOUTPUT.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL;
	configOUTPUT.output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH;
	configOUTPUT.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM;
	XMC_GPIO_Init(LED1,&configOUTPUT);

	XMC_GPIO_CONFIG_t configINPUT;
	configINPUT.mode = XMC_GPIO_MODE_INPUT_TRISTATE;
	XMC_GPIO_Init(KNOP1, &configINPUT);

	while(1)
	{
		/*loop*/

		if(XMC_GPIO_GetInput(KNOP1)==0)
		{
			XMC_GPIO_ToggleOutput(LED1);
			Delay100US(5000);
		}
	}

}


/*
*/
/**
 * @brief Inserts a delay time based on system timer configuration\n
 *
 * @param[in]   Time  Specifies the delay time length, in 100 micro seconds multiples\n
 * @return none\n
 *
 * <b>Reentrancy:  no</b><BR>
 *
 */
void Delay100US (unsigned long time)
{
	timingdelay =  time;
	while (timingdelay != 0);             //timingdelay is modified upon a system timer overflow in SysTick_Handler routine
}

/**
 * @brief SysTick_Handler is called after every System Timer overflow \n
 *
 * @param[in] none\n
 * @return none\n
 *
 * <b>Reentrancy:  no</b><BR>
 *
 */
void SysTick_Handler (void)             // SysTick Interrupt Handler
{
	uint32_t index;
	static uint32_t ticks = 0;
	ticks++;

	if(ticks == TICKS_WAIT)
	{
		for(index = 0; index < sizeof(message) - 1; index++)
		{
			XMC_UART_CH_Transmit(XMC_UART0_CH0, message[index]);
		}
		ticks = 0;
	}

	if(timingdelay != 0x00){
		timingdelay--;                    //Decrease the time counter timingdelay
    }

}
Could somebody please help me solve this issue, i'm now already struggling for 3 weeks with this issue...
Thanks to everyone