Slave side configuration for LIN module with MPC5777M EVM board ?

cancel
Showing results for 
Search instead for 
Did you mean: 

Slave side configuration for LIN module with MPC5777M EVM board ?

214 Views
anishchoudhary
Contributor III

Hi,

Please find the salve configuration for LIN module with MPC5777M EVM board in following lines...

LINFlexD_0.UARTCR.B.UART = 0 ;   // There is no meaning of LIN mode until UART bit is not reset in UARTCR register
    LINFlexD_0.LINCR1.B.INIT = 1 ;      // Put LINFlex hardware in init mode to come out reset that INIT bit

    LINFlexD_0.LINCR1.B.SLEEP = 0 ;                        // Disable the request of sleep mode in LIN
       while (0x1000 != (LINFlexD_0.LINSR.R & 0xF000))
       {
           // Wait for INIT mode of LIN module
       }

    LINFlexD_0.LINIBRR.B.IBR = 480 ; //baud rate
    LINFlexD_0.LINFBRR.B.FBR = 0 ; //fractional baud rate

 LINFlexD_0.LINCR2.R = 0x4000 ;         // avoid the idle state when bit error is come
    LINFlexD_0.LINTCSR.R = 0 ;                // Avoid that get slave in idle state

  LINFlexD_0.BIDR.B.CCS = 0x01u;                             // enhanced checksum for LIN Slave

LINFlexD_0.IFER.R = 0xF;                            // enable filters 0-3
    LINFlexD_0.IFMR.R = 0x0;                            // filters 0 - 3 are in identifier list mode.
    LINFlexD_0.IFCR[0].R = 0x1E37;                    // 8bytes, TX data, ID=0x37, CCS=0
    LINFlexD_0.IFCR[1].R = 0x1C35;                    // 8bytes, RX data, ID=0x35, CCS=0
    LINFlexD_0.IFCR[2].R = 0x1F36;

LINFlexD_0.IFCR[3].R = 0x1F35;                    // 8bytes, TX data, ID=0x35, CCS=1

 // LIN configure : MME=0,BF=1,MBL=3,INIT=0,AUTO=1
     LINFlexD_0.LINCR1.R = 0x00001380 ;

please make me sure that i did , is right or i have to do something else .?

Tags (1)
1 Reply

128 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the setting looks normal.

If you want to avoid resetting the state machine on bit error then clear LINCR2[IOBE], so use

LINFlexD_0.LINCR2.R = 0x0000 ;  

Also try to set the LINCR1[LASE].

BR, Petr