MPC5606B startertrak kit CAN bus pin mapping

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5606B startertrak kit CAN bus pin mapping

ソリューションへジャンプ
1,015件の閲覧回数
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 解決策
998件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

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

 

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
999件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

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

 

BR, Petr

0 件の賞賛
返信
986件の閲覧回数
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 件の賞賛
返信
986件の閲覧回数
sundar19
Contributor III

Any updates?

0 件の賞賛
返信