AnsweredAssumed Answered

LPUART problem

Question asked by Igor Masár on Aug 25, 2017
Latest reply on Sep 5, 2017 by Igor Masár

Hello, my application uses LPUART, this part of application is based on your example UART. In initialisation part I use your function LPUART1_receive_char and that works correctly.I can send string from my computer to the board. In main cyclic part of my program I send some CAN messages and so on. Here I just want to check whether the computer sent some UART string. Here I cannot wait until some data are in UART. Hence I modified your function to this function:


char LPUART1_check_receive_char(void)

char recieve = '\0';


recieve = LPUART1->DATA;}

return recieve;


It is working until I send just one character. If I send a string the UART stops working (but program is still working correctly except UART cannot receive any char (even though I send one character).

Could you help me?