UART Communication in XMC4200

Announcements

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User15944
Level 1
Level 1
First like received First reply posted First question asked
Hi I am using this code on xmc4200 microcontroller (Distane2Go (D2G) Product). Data is not coming over serial port pins(Rx and Tx Pins). It looks like There is some problem in the configuration Please help me.

#include
#include

const uint8_t message[] = "Hello world!!\n";

#define UART_TX P0_1
#define UART_RX P0_0


/*UART Cofiguration*/
XMC_GPIO_CONFIG_t uart_tx =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2,
.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM
};

XMC_GPIO_CONFIG_t uart_rx =
{
.mode = XMC_GPIO_MODE_INPUT_TRISTATE
};

XMC_UART_CH_CONFIG_t uart_config =
{
.data_bits = 8U,
.stop_bits = 1U,
.baudrate = 115200U
};


int main()
{
/*UART Initialization*/
XMC_UART_CH_Init(XMC_UART1_CH1, &uart_config);
XMC_UART_CH_SetInputSource(XMC_UART1_CH1, XMC_UART_CH_INPUT_RXD, USIC1_C1_DX0_P0_0);
XMC_UART_CH_Start(XMC_UART1_CH1);
XMC_GPIO_Init(UART_TX,&uart_tx);
XMC_GPIO_Init(UART_RX,&uart_rx);
uint32_t index;

for (index = 0; index < sizeof(message) - 1; index++)
{
XMC_UART_CH_Transmit(XMC_UART1_CH1, message[index]);
}



}


Still not able to see serial data. I used XMC_UART1_CH1 because from the data sheet P0.0 and P0.1 is connected to U1C1 from the data sheet.
2 Replies
user8710
Level 3
Level 3
5 questions asked 50 sign-ins 10 replies posted

Same problem different xmc and no one can answer this problem! succcc this "community"

0 Likes
Ananda_R
Moderator
Moderator
Moderator
10 likes given 5 likes given 100 sign-ins

Hi @user8710 

There will be no more support for the Distane2Go. Please find below the link for discontinued product notification. 
https://community.infineon.com/t5/Radar-sensor/Discontinued-Products-XENSIV-Radar-mmWave-24GHz-DEMO-...

I suggest you to work on our new boards we have with updated software and let us know if any support required.

Regards,

Anand

0 Likes