- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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));
}
}
-----------------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
BR,
Owen