Part Number: MSP432P401R
Tool/software: Code Composer Studio
Hi all, I am using MSP-EXP432P401R (Red) and testing two UARTs, uart0 and uart1. They are configured as CONFIG_UART_0 and CONFIG_UART_1 as follows. CONFIG_UART_1 is connected to another notebook via RS232 interface. I tested my customized RS232 connector with null modem successfully.
![]()
![]()
I connected my own customized RS232 connector to P3.3(4), P3.2(3) and GND(22). I use only 3 pins: RX, TX and GND.
If I use only uart0, there is no problem as in following screen capture:
![]()
If I use uart0 and uart1 together, all data from/to uart1 are broken as following screen shot:
<< screen shot of PC connected to uart0>>
![]()
<< screen shot of PC connected to uart1>>
![]()
Attached source, console.c
void *consoleThread(void *arg0)
{
char ch, cmnd_in[80], bbff[80], itoa_buf[5];
int i, len, cnt ;
cnt = 1;
/* Loop forever to start the console */
while (1) { // today
memset(cmnd_in, 0x00, sizeof cmnd_in);
cmnd_in[0] = 0x0d;
cmnd_in[1] = 0x0a;
UART_write(uart0, consoleDisplay, sizeof(consoleDisplay));
UART_write(uart0, userPrompt, sizeof(userPrompt));
i = UART_read(uart0, cmnd_in + 2, 20);
if (i != 20) {
while(1) ;
}
itoa(cnt, itoa_buf);
strcat(cmnd_in, " - ");
strcat(cmnd_in, itoa_buf);
UART_write(uart0, cmnd_in, strlen(cmnd_in));
UART_write(uart0, "\r\n",2);
i = UART_write(uart1, "\n\rEnter 20 chars : ", 19);
if (i != 19) {
while(1) ;
}
i = UART_read(uart1, bbff, 20);
if (i != 20) {
while(1) ;
}
UART_write(uart0, "\r\n\n", 3);
UART_write(uart0, &bbff[0], i);
UART_write(uart0, "\r\n\n", 3);
++cnt;
}
}
Please kindly advise me what I make mistake.
Any help and advise are appreciated.
Many Thanks in advance.
HaeSeung