UART RX issue on S32K148

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART RX issue on S32K148

1,254 Views
rcusack
Contributor II

I am using the lpuart_echo_s32k148/ uart example as my base project. I am using the main while loop like the following,

while(1)
{

    LPUART_DRV_ReceiveData(INST_LPUART1, buffer, 1UL);
    while(LPUART_DRV_GetReceiveStatus(INST_LPUART1, &bytesRemaining) != STATUS_SUCCESS);


   /* Send data */
    LPUART_DRV_SendData(INST_LPUART1, buffer, 1UL);
   while(LPUART_DRV_GetTransmitStatus(INST_LPUART1, &bytesRemaining) != STATUS_SUCCESS);

}

Now, according to the Quick Reference Guide, LPUART1_TX is on PTC7 and LPUART_RX is on PTC6. 

I am able to transmit characters from the PTC7 pin and I can verify the characters are transmitted via connecting it to an FTDI module with a wire. 

The problem is I am not able to receive data from the PTC6 pin. Using an FTDI module to transmit characters to that pin does not do anything. 

I have also noticed that the RX pin has a voltage level of 5 --- wondering if this has anything to do with it?

I am also able to send and receive characters from the serial terminal via USB. But I need to be able to sned and receive via the rx and tx pins.

Any tips? Thanks!

Tags (2)
0 Kudos
3 Replies

1,061 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello Ryan,

The lpuart_echo_s32k148 example expects the LF at the end of the message. Probably the terminal sends it and that is why it is working.

Please, could you check it?

Best regards,

Diana

0 Kudos

1,061 Views
rcusack
Contributor II

Hi Diana, I checked the output of the module that I am using to transmit data to the S32 board. It does include an LF at the end of the message. I have included a picture of an example message being sent from the module and also a picture of the board with the transmitter connected to the reception pin. This message being sent is never received on the S32 board.image.png

20200107_163431.jpg

0 Kudos

1,061 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

FTDI converter is not needed. You can use OpenSDA from the board. My theory is that you can't receive date due to a short circuit between your FTDI and OpenSDA ( FTDI can't control the line because OpenSDA pull the line because he doesn't have anything to send on the line).

Best regards,

Razvan

0 Kudos