GPIO configuration for LIN module on MPC5777M ?

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

GPIO configuration for LIN module on MPC5777M ?

778 Views
anishchoudhary
Contributor III

I am working on MPC5777M EVM board for LIN module implementation. For this I want to transmit the data from LINFlexD_1(Master) side to LINFlexD_0(Slave) side using interrupts. I has done interrupt portion and GPIO configuration . But i am not sure for GPIO part so please find the following GPIO configuration and make sure it that correct or not ?

void GPIOConfigurationLIN1_Master(void)
{
    SIUL2.MSCR_IO[41].B.SSS = 0x04u;     // Pad PC[9]: Source signal is LIN1_TXD
    SIUL2.MSCR_IO[41].B.ODC = 0x2u;        // Pad PC[9]: push-pull Output.
    SIUL2.MSCR_IO[41].B.OERC = 0x3u;    // Pad PC[9]: Maximum Skew rate
    SIUL2.MSCR_IO[41].B.ILS = 0x0u;        // Pad PC[9]: Automotive enable
}

void GPIOConfigurationLIN0_Slave(void)
{
    SIUL2.MSCR_IO[44].B.IBE = 0x1u;    /* Pad PA[13]: Enable pad for input - LIN0_RXD */
    SIUL2.MSCR_MUX[848u-512u].B.SSS = 0x01u;

}

Tags (1)
2 Replies

551 Views
anishchoudhary
Contributor III

Hi ,

      I done the configuration as per the the RM guideline but still some issue is there in code.so Please find the configurations and make me sure where I am going wrong ?

Thank you.

0 Kudos

551 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

If the PA[13] is used as LIN0_RXD, then MSCR_IO[13] must be configured.

 

But you must set both the RX and TX pins of the module for proper operation. The RX pin must be able to monitor the TX transmitted signal.

If you want to test communication between modules and as there is only single LIN transceiver available on the EVB, LINFlex modules could be connected together before this transceiver in the way TX pins together and RX pins together.

TX pins must be configured as open drain and use a pullup resistor. Transceiver must be powered for sure.

BR, Petr