M_CAN3 ,M_CAN4 Configuration for MPC5777M

cancel
Showing results for 
Search instead for 
Did you mean: 

M_CAN3 ,M_CAN4 Configuration for MPC5777M

962 Views
yalamandadosaky
Contributor V

Hi All,

Currently we have written can_driver for M_CAN1 and M_CAN2 nodes available on MPC 57xx MB , Now I want to write code for M_CAN3 and M_CAN4, But I am unable to locate the DB-9 Connector type for both M_CAN3 and M_CAN4 and I could n't see it on mother board also.

 

How do I can communicate using M_CAN3 or M_CAN4 and what are Tx and Rx pins for these modules.

 

Is any additional hardware is required to connect to MB ?Martin KovarPetr Stancik

Labels (1)
10 Replies

584 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

MPC57xx B has only two M_CAN transceivers. If you want to use more than two M_CAN modules simultaneously, you have to connect external M_CAN transceivers.

If you do no want to use all M_CAN modules and you want to test M_CAN3 and M_CAN4 only, you can disconnect jumpers j32 and j35 and connect M_CAN3 and M_CAN4 modules instead of M_CAN1 and M_CAN2. 

Regards,

Martin

584 Views
yalamandadosaky
Contributor V

Hi Martin , I am unable to locate the Tx and Rx Pins in I/O pin sheet. As there are multiple pins for M_CAN3 and M_CAN4 in I/O pin sheet.

Can you please tell me how to configure the Tx and Rx pins for M_CAN3 and M_CAN4 modules ?b55689PetrS

0 Kudos

584 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

there some combinations, but the following one should be usable:

SIUL2.MSCR_IO[95].R = 0x32800001;                    //MCAN3TX is for PF[15]  -- [OERC = Strong drive] -- [ODC = Push Pull] -- [No Safe  

                                                                   disable] -- [SSS = MCAN3TX]

SIUL2.MSCR_IO[64].B.IBE = 1;

SIUL2.MSCR_MUX[760-512].B.SSS = 0x1;           //MCAN3RX is for PE[0]

 

SIUL2.MSCR_IO[82].R = 0x32800001;                 //MCAN4TX is for PF[2]

SIUL2.MSCR_IO[83].B.IBE = 1;

SIUL2.MSCR_MUX[761-512].B.SSS = 0x1;           //MCAN4RX is for PF[3]

But do not forget, you have to connect these pins to MCAN transceivers.

Regards,

Martin

584 Views
yalamandadosaky
Contributor V

Hi Martin Kovar, I am able to communicate using M_CAN1 and M_CAN2 nodes with the following IO pin configurations.

   SIUL2.MSCR_IO[10].R = 0x32000001;     // Very Strong Drive,Push-Pull output enable MCAN1TX Pin, PA[10]
    SIUL2.MSCR_IO[11].R = 0x00080002;     // Enable input buffer for MCAN1RX
    SIUL2.MSCR_MUX[246].B.SSS = 0x2;      // Connect MCAN1RX to PA[11]

    SIUL2.MSCR_IO[41].R = 0x32800001;        //MCAN2TX is for PC[9]
    SIUL2.MSCR_IO[40].B.IBE = 1;
    SIUL2.MSCR_MUX[759-512].B.SSS = 0x3;    //MCAN2RX is for PC[8]

For communicating with M_CAN3 and M_CAN4 nodes , I disconnected jumpers j32 and j35 and I am using M_CAN1 and M_CAN2 nodes present on the board and connected DB-9 connectors to them. I changed  only  Tx_pins and Rx_pins according to the your suggestion in the code.

But neither Tx nor Rx is not happening. I changed with Tx_pins and Rx_pins configurations according to the I/O pins sheet ,but it did not worked.

0 Kudos

584 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

you can use IO SIUL2.MSCR_IO[64].B.IBE = 1; and also SIUL2.MSCR_IO[94].B.IBE = 1; both pins has MCAN_3RX function. But you also have to configure correct Input muxing.

At first, do not connect pins to transceivers. Connect only TX and RX pin of MCAN3 (or MCAN_4) module and check, if you transmit data. Because you do not receive acknowledge the module will continue to transmit the same message.

Regards,

Martin

584 Views
yalamandadosaky
Contributor V

Hi Martin , I just want to test M_CAN3 and M_CAN4 nodes on MPC5777M ,I am confusing how to connect and where to connect M_CAN3 and M_CAN4 modules? b55689

0 Kudos

582 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

it is possible you have connected incorrect pins from motherboard to transceiver.

Just for quick test, do not connect MCAN_3 (TX and RX) pins to transceiver, but connect only MCAN_3 TX pin to MCAN_3 RX pin and check, if you transmit the message. If yes, you can connect these pins to transceiver on the board. If not, search for correct pins.

You can apply the same process for MCAN4_module.

Regards,

Martin

582 Views
yalamandadosaky
Contributor V

Hi Martin Kovar, I am able to communicate using M_CAN1 and M_CAN2 nodes with the following IO pin configurations.

//    SIUL2.MSCR_IO[41].R = 0x32800001;        //MCAN2TX is for PC[9]
//    SIUL2.MSCR_IO[40].B.IBE = 1;
//    SIUL2.MSCR_MUX[759-512].B.SSS = 0x3;    //MCAN2RX is for PC[8]

SIUL2.MSCR_IO[10].R = 0x32000001;     // Very Strong Drive,Push-Pull output enable MCAN1TX Pin, PA[10]
//    SIUL2.MSCR_IO[11].R = 0x00080002;     // Enable input buffer for MCAN1RX
//    SIUL2.MSCR_MUX[246].B.SSS = 0x2;      // Connect MCAN1RX to PA[11]

0 Kudos

582 Views
yalamandadosaky
Contributor V

Hi Martin , the below line needs to be corrected  to SIUL2.MSCR_IO[94].B.IBE = 1;

SIUL2.MSCR_IO[64].B.IBE = 1;

 

is it  correct ? b55689

0 Kudos

582 Views
yalamandadosaky
Contributor V

Thank you Martin Kovar, I will check it.b55689

0 Kudos