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?
when i change MB from MB8 to MB5,the transmit complete interrupt can not be trigger.
please help me, thank you!
Solved! Go to Solution.
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.
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.
Best regards,
Hung
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。
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.
i find something wrong about the config of the can driver。