MPC5748G autosar canfd 64bytes

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

MPC5748G autosar canfd 64bytes

Jump to solution
1,414 Views
fujiainjun
Contributor I

hi  I  have a problem in debugging CANFD of 5748G.

 

I configurated CAN Driver with EB Tresos 21.0,The  MCAL Version is AUTOSAR4.2  HF18,The  ALL CAN message buffer size are 64 Bytes,when i used the MB8  to transmit a frame with Interrupt Mode,the frame can be transmit completely,the transmit complete flag is 1,but   the transmit complete interrupt can not be trigger.

The following picture is the Trace32 snapshot, the MB8'flag =1,but the  MB8' MASK =0

what's the relationship between the Register MASK,FLAG and MB?

 

微信图片_20210323211332.jpg

 

when i change MB from MB8  to MB5,the transmit complete interrupt can not be trigger.

 

 

please help me, thank you!

0 Kudos
Reply
1 Solution
1,370 Views
hungnguyenphi
NXP Employee
NXP Employee

My question is why i change  MB8  to MB5,the MB5'flag in CAN_IFLAG1 set to 1,too,then  the interrupt is triggered .But  CAN_IMASK1 and CAN_IMASK2 has no change(CAN_IMASK1 =0x7f,CAN_IMASK2=0x3).

[Hung] The CAN_IMASK1 =0x7f, it mean the interrupt for MB0 to MB6 is enable, but as you can see the CAN_IFLAG1 = 0x100, then the interrupt for MB8 is requested but the interrupt for MB8 is not enable, then the interrupt will not be triggered.

When MB8'flag is 1,but the mask is 0x7f,i think  it should be 0X1xx。

[Hung] If user want to enable the interrupt for MB8, then the mask should be 0x1XX. It seems that you have some issue in your application or configuration.

View solution in original post

0 Kudos
Reply
4 Replies
1,391 Views
hungnguyenphi
NXP Employee
NXP Employee

Hello @fujiainjun 

I would like to answer your question

The following picture is the Trace32 snapshot, the MB8'flag =1,but the  MB8' MASK =0

what's the relationship between the Register MASK,FLAG and MB?

[Hung] Could you please check the chapter  "43.4.11 Interrupt Masks 1 register (CAN_IMASK1)" and " 43.4.13 Interrupt Flags 1 register (CAN_IFLAG1)" in the Mpc5748G reference manual. If the MB8' MASK =0 there will be no interrupt for MB8. Please see the below picture for more information.

hungnguyenphi_0-1616647153272.png

 

 

Best regards,

Hung

0 Kudos
Reply
1,379 Views
fujiainjun
Contributor I

Thanks

My question is why i change  MB8  to MB5,the MB5'flag in CAN_IFLAG1 set to 1,too,then  the interrupt is triggered .But  CAN_IMASK1 and CAN_IMASK2 has no change(CAN_IMASK1 =0x7f,CAN_IMASK2=0x3).

 

When MB8'flag is 1,but the mask is 0x7f,i think  it should be 0X1xx。

                             

 

 

 

 

0 Kudos
Reply
1,371 Views
hungnguyenphi
NXP Employee
NXP Employee

My question is why i change  MB8  to MB5,the MB5'flag in CAN_IFLAG1 set to 1,too,then  the interrupt is triggered .But  CAN_IMASK1 and CAN_IMASK2 has no change(CAN_IMASK1 =0x7f,CAN_IMASK2=0x3).

[Hung] The CAN_IMASK1 =0x7f, it mean the interrupt for MB0 to MB6 is enable, but as you can see the CAN_IFLAG1 = 0x100, then the interrupt for MB8 is requested but the interrupt for MB8 is not enable, then the interrupt will not be triggered.

When MB8'flag is 1,but the mask is 0x7f,i think  it should be 0X1xx。

[Hung] If user want to enable the interrupt for MB8, then the mask should be 0x1XX. It seems that you have some issue in your application or configuration.

0 Kudos
Reply
1,350 Views
fujiainjun
Contributor I

  i  find something  wrong  about the config of  the can driver。

0 Kudos
Reply