How do I configure multiple UART peripherals on S32K116?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How do I configure multiple UART peripherals on S32K116?

跳至解决方案
3,262 次查看
santhosh23
Contributor III

Hello all,
Background: S32 DS 3.4 Software and for the example S32K1xx SDK RTM v4.0.3 Example Projects --> lin_slave_s32k116 and -> lpuart_echo_s32k116. 

I would like to use 2 UART periperals, LPUART1 for LIN communication and LPUART0 to work with arduino uno.
In my application whenever I send a lin signal from master, the slave s32k116 EVB should respond and send some string values from LPUART0 in order to communicate with arduino. I tried merging both the examples  lin_slave and lpuart_echo, but couldn't succeed.

Any suggestions or help would be highly appreciated!

Thanks in advance!!

Thanks & regards,
Santhosh


 

0 项奖励
回复
1 解答
2,856 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @santhosh23,

I just tested your project, I see the welcome message when I select Autobaud in my logic analyzer.

There must be something with the clock configuration.

Can test it on you side?

danielmartynek_0-1726645423646.png

 

Regards,

Daniel

在原帖中查看解决方案

0 项奖励
回复
14 回复数
3,221 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Santhosh,

Hard to tell just from the description, it could be anything.

Can you share the project here?

What exactly does not work?

If you are not able to send any UART data, and the LPUART driver APIs do not return any errors, check the pin configuration.

Have you checked the LIN and UART signals with an oscilloscope?

Do you use NXP EVB or your custom board?

 

Regards,

Daniel

 

0 项奖励
回复
3,205 次查看
santhosh23
Contributor III

Hello @danielmartynek ,
Thanks for your response!

Please find the attached zip file which includes all the necessary files for the project below with this message. 

In my application, I would like to send some UART signals from different periperal upon recieving some lin signals and my problem with this project is I couldn't see any LED responding to the lin signals and as well as no messages is observed from another UART periperal such as welcome message and the response for lin signal on the logic analyzer. 

When I tried the same examples with different project, it was working as expected. I'm not sure that I can merge two examples in the same code or do I have to make use of freeRTOS for this approach?
Please let me know if I am missing something? 
I will be looking forward for your response.

Thanks & regards,
Santhosh

0 项奖励
回复
3,151 次查看
santhosh23
Contributor III

Hello @danielmartynek ,

Is there any updates regarding this issue or do you need any additional file or information to process this issue?
Please let me know if you need any, I would be happy to provide them.
I will be looking forward for your response.

Best regards,
Santhosh

0 项奖励
回复
3,140 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @santhosh23,

I just tested the project you sent as is without any modification.

I see the UART0_TX signal at PTB1.

Can you please scope it with an oscilloscope?

 

Regards,

Daniel

 

 

0 项奖励
回复
2,927 次查看
santhosh23
Contributor III

Hello @danielmartynek ,

Thank you for your suggestions on the board!
Now the board is functioning fine. I recorded the signals from UART0_TX signal at PTB1 as shown in the below image:

santhosh23_0-1726479707454.png

 

The signal sent from the board does not match with the expected value. Do you have any idea what would be the reason for this issue?

Best regards,
Santhosh

0 项奖励
回复
2,905 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @santhosh23,

Is this the welcomeMsg?

Can you check the baudrate?

Do you have an analog oscilloscope?

Can you use it to check if the signal is distorted?

 

Thank you,

BR, Daniel

0 项奖励
回复
2,900 次查看
santhosh23
Contributor III

Hello @danielmartynek,
Yes, it is welcomeMsg and I even checked with baudrate which is 9600. I could see the message welcomeMsg on analyzer properly if I use the example uart_pal_echo_s32k116 individually. I am not sure where I am going wrong, do you see the same message on your analyzer too which is shown in below image?

santhosh23_0-1726557532751.png




Thanks & regards,
Santhosh

0 项奖励
回复
2,857 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @santhosh23,

I just tested your project, I see the welcome message when I select Autobaud in my logic analyzer.

There must be something with the clock configuration.

Can test it on you side?

danielmartynek_0-1726645423646.png

 

Regards,

Daniel

0 项奖励
回复
2,703 次查看
santhosh23
Contributor III

Hello @danielmartynek ,
Yes, you were right!
I've changed some clock configurations and now it is working as expected.

Thanks & regards,
santhosh

0 项奖励
回复
3,136 次查看
santhosh23
Contributor III

Hello @danielmartynek ,

Thank you so much for your response, I will try and update you soon.
Currently, I am facing some hardware related problem with the board. the MCU isn't getting powered on even if I placed the jumper J107 to 2-3 position, however it is turning on if I remove the jumper J15 from its poition 1-2. Do you have any idea how I can do hardware reset for the board or do you have any other suggestions regarding this issue? 

Regards,
Santhosh

0 项奖励
回复
3,110 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Santhosh,

It does not make much sense, J15 connect the power supply to the MCU, and there should be also R117 in place unless it was removed by you.

danielmartynek_0-1725013098604.png

 

Can you please measure the MCU power supply with an multimeter?

Is the MCU heating when powered?

 

Regards,

Daniel

 

0 项奖励
回复
3,076 次查看
santhosh23
Contributor III

Hello @danielmartynek ,
Thanks for your response!
Yes, I did the measurement of MCU power supply with an multimeter and there is no power supply coming in unless I remove the the jumper j15 from its position. After removing the jumper j15 it is showing as 5V and also D1 red led is turned on. 
It was working fine before, I have no idea why isn't it working now. Even I do not see MCU getting heated up when powered on.
Do you have any idea how to do hardware reset for the board or would it be the problem with the MCU?

Thanks & regards,
Santhosh

0 项奖励
回复
3,072 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Santhosh,

Is the input of J15 shorted to the ground?

Maybe if you remove J15, the MCU is not shorted anymore.

And it gets power supply via a GPIO pin instead.

So, it appears that it is powered even though J15 is disconnected.

 

Regards,

Daniel

0 项奖励
回复
3,068 次查看
santhosh23
Contributor III

Hello @danielmartynek ,
Thank you so much for your quick reply!
You were right, jumper J15 pin 2 is shorted with gnd. When I further followed j15 with schematics. I noticed that C143 capacitor is short cicuited and needs to be replaced.

Thanks & regards,
Santhosh