Setup: There are two MCUs, communicating with each other over UART. Let's call the transmitting MCU as A, and receiving MCU as B. MCU A and B are different. A is SAML22 (using IAR Compiler) and B is EFR32 (using GCC compiler).
Problem: For the MCU B to properly interprete a command, the command must have a line feed character (\n) at the end of the string. MCU A is transmiting the string using interrupt and the physical TX buffer is of 1 byte. Development and testing is done on a Windows machine.
char txCmd[] = "someCommand\n";
But, when the MCU A sends the command to the MCU B, the MCU B is not able to understand the \n at the end of the string.
What have we done so far: We used the dock light software to send the "someCommand\n" and the MCU B detects the line feed character very well and executes the command. We even sent the hex values of the command string with 0x0A at the end, and still the MCU B could not detect it.
What we will be trying: Use the logic analyzer and see what is being transmitted. Append \r\n to the string. Append 0x0D, 0x0A to the string.
Can someone help us to understand and solve this problem? Thanks!