XMC2Go VCOM Problems --> P2.1 does not transmit data even if set as UART TX

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

cross mob
Argiola
Employee
Employee
5 sign-ins First question asked First like given

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 Solution
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

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

View solution in original post

2 Replies
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

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

Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

    This thread will be closed due to long time no reply, please feel free to ask if you have any other questions. Thanks for your understanding.

BR,

Owen

0 Likes