Example MPC5746R FlexCAN

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

Example MPC5746R FlexCAN

1,040 Views
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.

Labels (1)
Tags (2)
5 Replies

673 Views
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 Kudos

673 Views
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 Kudos

673 Views
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 Kudos

673 Views
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

673 Views
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 Kudos