MPC5606B startertrak kit CAN bus pin mapping

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

MPC5606B startertrak kit CAN bus pin mapping

Jump to solution
898 Views
sundar19
Contributor III

Hi,

I want to use all 6 CAN buses in mpc5606b , I purchased the startertrak dev kit. And in that I saw there are 6 CAN buses named as CAN_Tx and CAN_Rx in mpc5606B controller IC. Then Do I need to buy CAN tranceivers seperately in order to use them? As already there is MCZ3390S5EK (CAN transceiver) and a TJA1050( CAN transceiver) in the dev board which can be used for two of the CAN buses of mpc5606b and for the rest four of them should I buy seperate CAN transceivers ? Please help!

Tags (2)
0 Kudos
1 Solution
881 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

yes, you will need separate CAN transceivers on each FlexCAN module.

 

BR, Petr

View solution in original post

0 Kudos
3 Replies
882 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

yes, you will need separate CAN transceivers on each FlexCAN module.

 

BR, Petr

0 Kudos
869 Views
sundar19
Contributor III

Thank you so much 

I need to use multiple CAN bus at the same time.

An example for transmitting message using CAN bus is as follows

void CanTxMsg (uint32_t id, uint8_t mb, uint8_t dlc, uint8_t data[], uint8_t ext)
{
    uint8_t	i;

    if (ext)
    {
        CAN_1.BUF[mb].CS.B.IDE = 1; /* extended ID */
        CAN_1.BUF[mb].ID.R = id;    /* Tx ID extended */
    }
    else
    {
        CAN_1.BUF[mb].CS.B.IDE = 0; /* standard ID */
        CAN_1.BUF[mb].ID.B.STD_ID = (uint16_t)id; /* Tx ID standard */
    }
    CAN_1.BUF[mb].CS.B.RTR = 0;      /* no remote Tx request frame */
    CAN_1.BUF[mb].CS.B.LENGTH = dlc; /* # bytes to Tx */
    for (i = 0; i < dlc; i++) 
    {
        CAN_1.BUF[mb].DATA.B[i] = data[i]; /* Data to Tx */
    }
    CAN_1.BUF[mb].CS.B.SRR = 1;            /* Tx frame */
    CAN_1.BUF[mb].CS.B.CODE = CAN_TX_MSG;  /* Send msg */ 
}

should I replace CAN_1 to CAN_0 to use the 0th CAN bus?

to be precise to use multiple CAN buses

1. Initialize those CAN buses using RAPPID code generator.

2. create my own functions for each CAN bus 

for example , CanTxMsg() is used to transmit messages using CAN bus 1 , so I will replace CAN_1 with CAN_0 and create a new function definition known as CanTxMsg0() in the CANdrv.c file which is for transmitting message using 0th CAN bus

3. I will also add the CanTxMsg0() to the CANapi.h file so that it is declared as a global function.

4.Now I will call the function CanTxMsg0() in the main.c file to use it 

Please let me know if the above method is correct 

Thank you

 

Tags (2)
0 Kudos
869 Views
sundar19
Contributor III

Any updates?

0 Kudos