AnsweredAssumed Answered

How to configure receiver handler of LIN module on MPC5777M EVM board ?

Question asked by anishchoudhary on Jan 15, 2018
Latest reply on Feb 7, 2018 by anishchoudhary

For LIN module on MPC5777M and MPC5748G EVM board ? I configure receiver handler for LIN slave that you can find in following lines :

if( LINFlexD_0.BIDR.B.ID == 0x35u ) //LINFlexD_1.BIDR.ID=0x35;(master)

{

    LINFlexD_0.LINCR2.B.DDRQ =0;

 

        while (!LINFlexD_0.LINSR.B.DRF);     

 

    /* wait for Receiving Message Buffer */
    while (1 != LINFlexD_0.LINSR.B.RMB)
    {
    // Wait from RMB
    }
        uint8_t __attribute__ ((unused)) RxBuffer[8] = {0} ;
        uint8_t i;

 

        for (i=0; i<4;i++)
        {                 /* If received less than or equal 4 data bytes */
            RxBuffer[i] = (LINFlexD_0.BDRL.R>>(i*8));
        }
        for (i=4; i<8;i++)
        {
            RxBuffer[i] = (LINFlexD_0.BDRM.R>>((i-4)*8));
        }

    LINFlexD_0.LINSR.R = 0x0207;

}

please find the code and check it out that is right or i must have to do some other configuration for that reception handler part in slave side ?

Outcomes