lin_master_s32k116 example lin stack, lpuart whay not operate?

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

lin_master_s32k116 example lin stack, lpuart whay not operate?

1,662 Views
skb
Contributor II

hello community
I am not able to solve the lin communication problem.
Please help me..

First, to use LIN communication, LPUART1, which is S32k116_48QFN PTC8 RX / PTC9 TX, was used.

Second, I used the MLX80020 made by Melexis as the LIN transceiver.
The LIN transceiver is pulled up. The circuit is in the attached figure.(simple circuit.png)

Third, I will simply read the fixed temperature value set in the motor driver (MLX81325) through LIN communication.

And I used the basic example lin_master_s32k116.
Then, the LDF file was loaded and entered into the Lin_Stack component inspector.

And the program works as follows. (Check the attached code, sample code.png)
1. wake up
2. Start normal schedule
3. Check flag -> clear flag -> read or write frame
4. Repeat (After checking the lin communication status, move once again in sleep mode)

But the communication does not work by this code.
The signal of PTC9 connected to LIN TX in s32k116 was checked through the oscilloscope. It produces no signal.
As a result, no signal is generated in the LIN BUS of the LIN transceiver.
Why is there no signal output from LPUART TX? Is there something wrong with the code I presented?

According to Figure 7. Master node state machine of AN12788.pdf,
To become LIN_TX_COMPLETED or LIN_RX_COMPLETED, the following flow is required.
1. IDLE
2. SEND_BREAK_FIELD
3. SEND_PID
4. PID_OK
5. LIN_NODE_STATE_RECV_DATA
6. LIN_NODE_STATE_RECV_DATA_COMPLTED
7. LIN_RX_COMPLETED

In the example code I uploaded, only 1, 2, and 5 occur.
And, 6 and 7 cannot be seen.

Is this also because data is not output from TX?

Regards
skb

0 Kudos
7 Replies

1,617 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

did you really select and config right pins for LPUART1?
When checking lin_master_s32k116 demo example, PC6/PC7 are selected in pin_mux component.
So please check this, if needed modify pin_mux component, generate PE code and try it again.

BR, Petr

0 Kudos

1,607 Views
skb
Contributor II

Hi, @PetrS 

Thank you for your advice.

but I'm already change LPUART0 to LPUART1 and PTC6 -> PTC8 / PTC7 -> PTC 9

thanks

regard

skb

 

0 Kudos

1,564 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I tried lin_master_s32k116 demo example on the EVB, without slave connected, just to see if anything is send on LIN bus. And I can see LIN messages as example description mentions. 
Also if modify the pin mux for PTC8/PTC9 and connecting those pins together without ext. transceiver I can see the same messages as before.

BR, Petr

0 Kudos

1,557 Views
skb
Contributor II

Hi @PetrS 

As you well know, if you run the example code as it is, there is no problem.
But the LDF file that I created doesn't work.

but, I want to use the PDF file I generated.
Could you mind to test the LDF file that I created?
Please give me a email address or any other SNS accounts.

I will send my LDF file to you or upload it.

And does LIN communication work even if the slave is not connected?

 

BR, skb

0 Kudos

1,549 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can either send private message here by clicking to my name or you can create new support Case
https://community.nxp.com/t5/HomeTest-Knowledge-Base/How-to-submit-a-new-question-for-NXP-Support/ta...

If slave is not connected, you can send a frame outside, but does not receive response from slave, so just LIN header will be sent.

BR, Petr

0 Kudos

1,544 Views
skb
Contributor II

Hi, @PetrS 

 

I can't access the link.

 

Please check the link.

 

BR, skb

 

0 Kudos

1,536 Views
PetrS
NXP TechSupport
NXP TechSupport
0 Kudos