MPC5606B startertrak kit CAN bus pin mapping

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC5606B startertrak kit CAN bus pin mapping

跳至解决方案
918 次查看
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!

标记 (2)
0 项奖励
1 解答
901 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

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

 

BR, Petr

在原帖中查看解决方案

0 项奖励
3 回复数
902 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

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

 

BR, Petr

0 项奖励
889 次查看
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

 

标记 (2)
0 项奖励
889 次查看
sundar19
Contributor III

Any updates?

0 项奖励