I use two S32K144EVB for UART Communication.
One only sends value (I will call TX S32K),
the other only receives value(I will call RX S32K).
The problem is that "RX S32K" Can not receive the value over 0x80 ~ 0xFF.
It seems only receive 0x7F(7bit).
"RX S32K" Can receive the value from 0 to 127(0x7F).
Also I couldn't find the value over 0x80 in RxBuff, when using Debug breakpoint.
I use this function
void LPUART1_transmit_char(char send)
{ /* Function to Transmit single Char */
while((LPUART1->STAT & LPUART_STAT_TDRE_MASK)>>LPUART_STAT_TDRE_SHIFT==0);
/* Wait for transmit buffer to be empty */
LPUART1->DATA=send; /* Send data */
}
I try many things, but i don'y know reason about this problem.
Thank you.
I solved the problem!
The data type was a problem.
I changed Char data type to unsigned Char data type
void LPUART1_transmit_char(char send)
{ /* Function to Transmit single Char */
while((LPUART1->STAT & LPUART_STAT_TDRE_MASK)>>LPUART_STAT_TDRE_SHIFT==0);
/* Wait for transmit buffer to be empty */
LPUART1->DATA=send; /* Send data */
}
Hi,
Have you analyzed the signal on the bus?
Is TX MCU sending correct data?
Thanks.
Daniel