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
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
Hi, @PetrS
Thank you for your advice.
but I'm already change LPUART0 to LPUART1 and PTC6 -> PTC8 / PTC7 -> PTC 9
thanks
regard
skb
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
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
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
have no issue to access it
BR, Petr