Example MPC5746R FlexCAN

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

Example MPC5746R FlexCAN

1,078 次查看
ronlewis
Contributor III

I am having issue getting the CAN Example for the MPC5746R to work?  I am using the 57XX mother board with the MPC5746R-252DS.  I would expect that this example would just work.

I have verified that the pin jumpers J37 and J38 are in the 2-3 position.   I have also tried with them in the 1-2 position.

I am using s32DS 2017.R1 and an iSystems debugger.

标签 (1)
标记 (2)
5 回复数

711 次查看
flyskyr丶
Contributor III

Hi  Ron,

I had tried it and found a problem. CAN2 has 64 MessageBuffer, but it just has 8 MB can be using.

 I am very confused. Can you explain it?

0 项奖励

711 次查看
ronlewis
Contributor III

I am not sure I understand your question.

The example from above uses MB[0] to receive a message on CAN2,

0 项奖励

711 次查看
flyskyr丶
Contributor III

Hi Ron,

I found and solved this problem.

When using your configuration 

pastedImage_1.png

MAXMB in this register is not set to 0x3F successfully, it is 0xF. Because of that "This field can be
written only in Freeze mode because it is blocked by hardware in other modes". Only 16 MBs can be used in this case.

So I add that "CAN_1.MCR.B.MAXMB = 63;". Now , 64 MBs can be used. it's fine.

0 项奖励

711 次查看
martin_kovar
NXP Employee
NXP Employee

Hello Ron,

the example you use is created in S32 Design Studio v1.1 and unfortunately, it cannot be import and compiled in S32DS 2017.R1, because there were some significant changes in compiler.

I recommend you create new project in S32DS 2017.R1 and manually copy all necessary source code into new project.

Regards,

Martin

711 次查看
ronlewis
Contributor III

Martin,

    I did not have any issues compiling the example.  Example compiles and runs on the hardware, but I don't see any activity on the CAN bus. I did create a new project in 2017.R1 and copied over the the code from the FlexCAN project, but I still don't see any CAN Activity.

0 项奖励