MPC5748G autosar canfd 64bytes

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

MPC5748G autosar canfd 64bytes

跳至解决方案
1,141 次查看
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 项奖励
1 解答
1,097 次查看
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 项奖励
4 回复数
1,118 次查看
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 项奖励
1,106 次查看
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 项奖励
1,098 次查看
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 项奖励
1,077 次查看
fujiainjun
Contributor I

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

0 项奖励