Data recption is not happen through the LIN module for MPC5777M module ?

cancel
Showing results for 
Search instead for 
Did you mean: 

Data recption is not happen through the LIN module for MPC5777M module ?

932 Views
anishchoudhary
Contributor III

I am working on MPC5777M EVM board with LIN protocol. To establish communication between two ports through LIN protocol I have to configure all the parts(Master,slave,GPIOs) of LIN module those you can find in the following attachment. Please find the attachment and test the code what is wrong with the code? because the transmission is happen but the reception is not happened ? In attachment file(linflexd_lin5777.c) please change the following line slave and master configuration side :

          LINFlexD_0.LINCR2.R = 0x4000 ; into  LINFlexD_0.LINCR2.R = 0x40;

Tags (2)
1 Reply

223 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

You wrote the transmission is OK, so I suggest you see full frame on LIN bus. Is this also seen on Slave RX pin?

How is your connection on the EVB board?

As you did not enable RX filter then after Header is received (RX interrupt generated with HRF flag set) you need to read

the received ID from the BIDR register and specify the data field length, checksum type and direction bit before the

reception of the stop bit of the first data byte. Below picture shows this.

pastedImage_1.png

 

When the checksum is received, an RX interrupt is generated for software to read the received data from BDR[0:7] and the RMB bit is set. Software must then release the data buffer by resetting the RMB bit in the LINSR.

All above is missing in your code.

Also for the slave node try to set LINCR1[LASE] bit.

LINCR2[IOBE] specify if the LIN state machine is reseted when bit error is detected, if you want to avoid this clear the IOBE.

BR, Petr