AnsweredAssumed Answered

Initalization of M_CAN_2 for MPC5777M

Question asked by yalamanda dosakyala on Dec 2, 2016
Latest reply on Dec 8, 2016 by Petr Stancik

Hi All I able to initialize  fir M_CAN_1 for mpc5777m and able to transmit and receive. what are the things should taken care for initializing M_CAN_2 or it is same as like M_CAN_1,I did same initialize like M_CAN_1, But I am confused with assigning memory locations like start address of ID filter elements,TX Buffer and RXFIFOs,


Because All M_CAN will use the same Message RAM in MPC 5777M.


Can any one help me how to initialize memory address for M_CAN_2.

These are my memory addresses for M_CAN_1


#define MCAN_MSG_RAM_BASE_ADDR 0xFFED4000 // base address of shared MSG RAM
#define MCAN_MSG_RAM_LENGTH 0x4000


M_CAN_1.SIDFC.R = 0x00010000;         // Configuring One Standard ID filters and its offset address.


    M_CAN_1.TXBC.R = 0x00020300;          // Setting up 2 Tx Buffers, Transmit Buffer Offset Address
    M_CAN_1.RXF0C.R = 0x80020100;         // Setting up 2 Rx FIFO 0 with overwrite new messages when fifo full and its  offset address.
    M_CAN_1.RXF1C.R = 0x00020200;         // Setting up 2 Rx FIFO 1 with discard new messages when fifo full and its offset address


Can use same thing for M_CAN_2 or else what needs to be change.