MPC5748G CAN receiver issue (CAN1 working, CAN0,2,3,5,6,7 not working)

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

MPC5748G CAN receiver issue (CAN1 working, CAN0,2,3,5,6,7 not working)

跳至解决方案
1,956 次查看
navinars
Contributor III

Hi,

  I am working on a CAN based project in the MPC5748G-Devkit board. I need to receive data via 7 CAN interfaces, i.e., CAN0, CAN1, CAN2, CAN3, CAN5, CAN6 and CAN7 and process it dynamically. I am using the S32 IDE and OpenSDA Debugger. 

I configured one Devkit board's CAN1 to transmit a packet continuously with the ID 0x555. Then I modified the receiver code to receive data in all the above listed CAN interfaces, and display them. But I am only able to receive the data in the CAN1 interface, not the other CAN interfaces. Is there any specific configurations that needs to be made for the other CAN modules? I saw that CAN0 had some additional configurations, but CAN1-CAN7 are the same. 

I am using a custom board for breaking out the required CAN lines. The pin connections are: 

CAN0_RX - PA15           CAN0_TX - PA13

CAN1_RX - PC11           CAN1_TX - PC10

CAN2_RX - PE9             CAN2_TX - PE8

CAN3_RX - PF9             CAN3_TX - PF8

CAN5_RX - PE0             CAN5_TX - PE1

CAN6_RX - PB10           CAN6_TX - PF0

CAN7_RX - PG9             CAN7_TX - PG8

I probed the input lines and the CAN data is received at the pins correctly. Are there any additional configurations which needs to be done? 

I have attached the receiver code for your reference. I am not using Processor Expert, as I want to go with the raw option.

    jiri.kral@nxp.com  stanish‌  lukaszadrapa‌  uditsalunke martinkovar‌  

标记 (4)
0 项奖励
回复
1 解答
1,640 次查看
navinars
Contributor III

Hi,

   I figured out the issue - I was being pretty dumb! :-) 

It was my mistake. I did not set the mux for the tx pins correctly. I had configured the mux for the CAN Rx pins according to the "IO_Signal_Description_and_Input_Multiplexing_Tables.xlsx" sheet, but did not take into account that the CAN tx has to be correctly muxed too. I tweaked the settings and voila - everythings working now. Example for the CAN0 is shown below.

SIUL2.MSCR[13].B.SSS = 4; /* PA15: Source signal is CAN0_TX */ --> This value was 1 previously! Needs to be 4.
SIUL2.MSCR[13].B.OBE = 1; /* PA15: Output Buffer Enable */
SIUL2.MSCR[13].B.SRC = 3; /* PA15: Maximum slew rate */
SIUL2.MSCR[15].B.IBE = 1; /* PA15: Enable pad for input - CAN0_RX */
SIUL2.IMCR[188].B.SSS = 1; /* CAN0_RX: connected to pad PA13 */

After making that change in all the CAN's, they immediately started working. 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,641 次查看
navinars
Contributor III

Hi,

   I figured out the issue - I was being pretty dumb! :-) 

It was my mistake. I did not set the mux for the tx pins correctly. I had configured the mux for the CAN Rx pins according to the "IO_Signal_Description_and_Input_Multiplexing_Tables.xlsx" sheet, but did not take into account that the CAN tx has to be correctly muxed too. I tweaked the settings and voila - everythings working now. Example for the CAN0 is shown below.

SIUL2.MSCR[13].B.SSS = 4; /* PA15: Source signal is CAN0_TX */ --> This value was 1 previously! Needs to be 4.
SIUL2.MSCR[13].B.OBE = 1; /* PA15: Output Buffer Enable */
SIUL2.MSCR[13].B.SRC = 3; /* PA15: Maximum slew rate */
SIUL2.MSCR[15].B.IBE = 1; /* PA15: Enable pad for input - CAN0_RX */
SIUL2.IMCR[188].B.SSS = 1; /* CAN0_RX: connected to pad PA13 */

After making that change in all the CAN's, they immediately started working. 

0 项奖励
回复
1,640 次查看
uditsalunke
Contributor III

did you have Acceptance filter configured for those additional nodes?

Udit

0 项奖励
回复
1,640 次查看
navinars
Contributor III

Hi uditsalunke‌,

   I have configured all the CANs to accept packets with all ID's. I tested with sending different ID's and CAN1 accepts them all. This same configuration is used for all the CAN's, which is why I am confused. 

0 项奖励
回复