S32K144EVB UART 8bit Send Receive Problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K144EVB UART 8bit Send Receive Problem

1,200件の閲覧回数
hjinha
Contributor II

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.

タグ(2)
2 返答(返信)

1,029件の閲覧回数
hjinha
Contributor II

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 */
}

1,029件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Have you analyzed the signal on the bus? 

Is TX MCU sending correct data?

Thanks.

Daniel 

0 件の賞賛
返信