Announcements

Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

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

XMC™ Forum Discussions

Argiola
Employee
Employee
First question asked First like given Welcome!

Hello community,

I am using XMC 2Go Kit and I set the XMC1100 UART as TX and RX on pins 2.1 and 2.2. If I use the XMC4200 as VCOM port, I can send from my terminal DATA (I see with oscilloscope) but I can not send data in the other direction (from XMC1100 P2.1-> XMC4200). Measuring with OSci, the pin P2.1 is pulled high from external (I assume xcm4200 is doing it and it appears stuck high). 

If I set another pin as transmitter (for example P0.14), it works.

Could you please support me? 

MY code to use UART:

-----------------------------------------------------------------------------------

void UART_config_P2_1_P2_2(void) {


XMC_UART_CH_Init(XMC_UART0_CH0, &uart_config); // UART0, channel 0
XMC_UART_CH_EnableMasterClock(XMC_UART0_CH0);
XMC_UART_CH_Start(XMC_UART0_CH0);
XMC_UART_CH_SetInputSource(XMC_UART0_CH0, XMC_UART_CH_INPUT_RXD, USIC0_C0_DX0_DX3INS); // P2.2 input RXD USIC0_C0_DX3_P2_2
//XMC_GPIO_Init(P2_2, &uart_rx); // XMC_GPIO_MODE_INPUT_TRISTATE
//XMC_GPIO_Init(P2_1, &uart_tx); // XMC_GPIO_MODE_OUTPUT_ALT6
XMC_GPIO_SetMode(P2_2, XMC_GPIO_MODE_INPUT_TRISTATE); // XMC_GPIO_MODE_INPUT_TRISTATE
XMC_GPIO_SetMode(P2_1, XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT6 ); // XMC_GPIO_MODE_OUTPUT_ALT6

 

while(1) {
XMC_UART_CH_Transmit(XMC_UART0_CH0, 0xFFFF);
while (!(XMC_UART_CH_GetStatusFlag(XMC_UART0_CH0) & XMC_UART_CH_STATUS_FLAG_TRANSMITTER_FRAME_FINISHED));

}

}

-----------------------------------------------------------------------------------

0 Likes
1 Reply
Owen_Su
Moderator
Moderator
Moderator
First question asked 50 solutions authored 100 sign-ins

Hi, @Argiola ,

    Looks like there's a problem with your pin configuration, you can refer to the attachment and then check your codes, and you can also follow the document. Hope this can help you.

https://www.infineon.com/dgdl/Infineon-XMC2Go_Initial-start-up-Guide-GS-v01_02-EN.pdf?fileId=db3a304...

BR,

Owen

0 Likes
This widget could not be displayed.