How to USE UART1 (dev/ttyLF1) in Linux (A-Core)

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

How to USE UART1 (dev/ttyLF1) in Linux (A-Core)

Jump to solution
1,327 Views
LB666
Contributor I

Hi NXP Community,

I want to use the UART1 on our board (referenced S32G-VNP-RDB2) in Linux System.

As I execute "echo "XXX" > /dev/ttyLF1", I could not probe the signal on UATR1 TXD.

I could not communicate with other PC using minicom through UART1 either(I use BSP_37).

How could I use  the UART1 in Linux System?

Solved! Go to Solution.

0 Kudos
1 Solution
1,113 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback. If you are not able to see ttyLF1 being listed, then other changes may have been made. We were able to get our hands on an RDB2 and we can see the same outcome as before:

DanielAguirre_0-1709647604780.png

Please, let us know.

View solution in original post

0 Kudos
12 Replies
1,310 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

We may be misunderstanding, but we understand that this was already solved?

We do apologize for the inconvenience.

Please, let us know. 

0 Kudos
1,303 Views
LB666
Contributor I

No, it's not a solution. I want to use UART1 on the A core, not the M core. For example, I want to communicate with peripherals through UART1 on the A core, but I cannot send or receive messages through UART1 using BSP37 Linux. Could you please provide me with help? Where do I need to modify the code

0 Kudos
1,282 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback and we apologize for our misunderstanding. We will verify the correct steps (if possible) and update you as soon as we can.

We apologize for any delay from our side.

Please, let us know.

0 Kudos
1,278 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

It seems that modifications to the device tree are required. Once we modified the device tree, we are able to ping through UART1:

DanielAguirre_0-1708970378832.png

Since you are working with an RDB2, the following modifications should be done under the "linux\arch\arm64\boot\dts\freescale\s32gxxxa-rdb.dtsi" file:

DanielAguirre_1-1708970527046.pngDanielAguirre_2-1708970548077.png

Once modified, the image needs to be compiled. Once compiled, the following files need to be replaced under the "boot" partition of your SD card:

  • Image file > linux\arch\arm64\boot\Image
  • DTB file > linux\arch\arm64\boot\dts\freescale\s32g274a-rdb2.dtb

With that, you should be able to use UART1.

Please, let us know.

0 Kudos
1,220 Views
LB666
Contributor I

Thank you very much for your reply. After modifying according to the method you provided, the device ttyLF1 is no longer available. Are you using the BSP37 version of Linux? I will use the BSP37 version of Linux directly, and there will be ttyLF1 as the device, but it cannot communicate。can you give me some help?

0 Kudos
1,211 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback. As shown under our previous image, we are using BSP37.0 for this modification:

DanielAguirre_0-1709306618911.png

As for ttyLF1 not being available, since the modifications we shown are only related to pin mapping, the serial1 device should not be affected. Can you help us share the full boot log of your system? Also, help us adding the following command to your log:

dmesg | grep ttyLF1

As a note, we compiled Linux manually then copy the previously mentioned files into the boot partition of our SD card. The base BSP37.0 image we used was the pre-compiled image provided by NXP (under a *.tgz file).

Please, let us know.

1,153 Views
LB666
Contributor I

I have noticed a difference. You are using the development board and device tree of s32g274aevb3, while I am using the development board and device tree of s32g274ard2. Could you please provide information on how to modify s32g274ard2?

0 Kudos
1,205 Views
LB666
Contributor I

I have noticed a difference. You are using the development board and device tree of s32g274aevb3, while I am using the development board and device tree of s32g274ard2. Could you please provide information on how to modify s32g274ard2?

0 Kudos
1,142 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

At this moment, EVB3 is the platform we have available. Still, the steps we provided were on regards of RDB2:

"

Since you are working with an RDB2, the following modifications should be done under the "linux\arch\arm64\boot\dts\freescale\s32gxxxa-rdb.dtsi" file:

...

Once modified, the image needs to be compiled. Once compiled, the following files need to be replaced under the "boot" partition of your SD card:

  • Image file > linux\arch\arm64\boot\Image
  • DTB file > linux\arch\arm64\boot\dts\freescale\s32g274a-rdb2.dtb

"

Are working with Yocto project or are you building the component manually? Can you help us share the respective logs from your setup?

Please, let us know.

0 Kudos
1,135 Views
LB666
Contributor I

Hello, the log of the startup process is attached. Please check if there is any useful information for solving the problem. Thank you.

0 Kudos
1,137 Views
LB666
Contributor I

I modified according to the method you provided and working with Yocto project .I used the dmseg | grep ttyTL1 command to search for the log of ttyTL1, but there was no output。As shown in the following figure

LB666_0-1709603595313.jpeg

 

 

0 Kudos
1,114 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback. If you are not able to see ttyLF1 being listed, then other changes may have been made. We were able to get our hands on an RDB2 and we can see the same outcome as before:

DanielAguirre_0-1709647604780.png

Please, let us know.

0 Kudos