Can0 register and other CAN_X register are different

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

Can0 register and other CAN_X register are different

764 Views
mengmeng_yuan
Contributor III

Hi,

    My CAN0 FD works well, but when i set the CAN1 and CAN2 FD register, I find the IDE S32 show the error.Then i compare the  CAN0 and CANX  register in the MPC5748.h, and surprise find there are a lot of difference between  CAN0 and  CANX. A  lot of  registers exit in CAN0, while not exit in CANx, like CBT、IMASK3.   Then  i don't know how to configure CANX can_fd register.

the IDE S32 show error as below:

pastedImage_1.png

the register comparison between CAN0 and CAN7 .

pastedImage_1.png

Can I replace the CAN_1_7_tag with the can_0_tag?

pastedImage_2.png    pastedImage_3.png

Labels (1)
Tags (1)
0 Kudos
6 Replies

666 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

what is the device you are using in fact? Is this MPC5748G?

If yes all FlexCAN modules supports CAN FD, CAN0 supports also PN functionality, but does not have ECC functions as you shown (MECR, ERR... registers)

So what is the header version you have?

You can do modification you mentioned, but you shoudl not access registers that are not available.

BR, Petr

0 Kudos

666 Views
mengmeng_yuan
Contributor III

The device i use is Mpc5748G, and the version is 4.0.00. Do you have the newest version?    

pastedImage_1.png

0 Kudos

665 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

for example file from S32DS 2.1 demo examples.

BR, Petr

0 Kudos

665 Views
mengmeng_yuan
Contributor III

Hi petr,

     Now i am using the PC10 and the PC11 as the CNA1 Can Fd transmit and receiver pastedImage_1.png

     while using the PF8 and PF9 as the CAN2 can fd transmit and receiver.

pastedImage_2.png

      But the Sch show that two CAN share the same port, I have a little confusion about how to configure the port.   Especially to the SIUL2.IMCR[Num].B.SSS register, I can't confirm the Num value, and i also can't find the value in the MPC5748 datasheet.

My PC10 and the PC11 port configuration as below:

pastedImage_3.png

 PF8 and PF9 port configuration as below:

     pastedImage_4.png

    can you help me confirm the value and tell me where i can find the value?

Thanks.

0 Kudos

665 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you can fond that info in the IO Signal Table or Input Muxing table given in IO Signal description excel file attached to the Reference Manual.

So for CAN1RX on PC11 you have 

2020-07-01_21-19-03.jpg

and thus SIUL2.IMCR[701-512].B.SSS = 0x3;

or from Input muxing

2020-07-01_21-21-24.jpg

and you have directly

SIUL2.IMCR[189].B.SSS = 0x3;

Similarly you can find necessary info for CAN2 RX on PF9

BR, Petr

0 Kudos

665 Views
mengmeng_yuan
Contributor III

Hi petr,

     Thanks,I find the attachment in the reference manual.

0 Kudos