My system uses CANFD with Extended ID mode.
So, I set 'CAN Extended ID Support' at the the Tresos MCAL CAN setting.
This makes CAN_FD_ID type as unit32.
But the other masks for CAN ID is not changed for Extended CAN ID.
Especially, CAN_CANFD_MASK is still for uint16.
Is there any other mask for CANFD??
or does EB Tresos generate the wrong codes??
In my code, canid is uint32. but the CAN_CANFD_MASK is for uint16. So, CANFD message is not recognised with that MASK.
Which release package of MPC5xxx are you using?
The above questions are based on your observations on the source code? Did you get any issues when trying to transmit and receive with Extened ID?
Bold is your question. please check my following answers
Which release package of MPC5xxx are you using?
: NXP\AUTOSAR\MPC574XG_MCAL4_2_RTM_HF24_1_0_0
The above questions are based on your observations on the source code?
: Sure, that's based on the MCAL code - Can_GeneralTypes.h. You can find CAN_CANFD_MASK is unit16 type there. It looks like 'non-extended CANFD mask'.
That's why I ask where is the correct mask for 'Extended CANFD'.
Did you get any issues when trying to transmit and receive with Extended ID?
: Yes, there is a big problem with this.
my AUTOSAR configurator uses CAN_CANFD_MASK on checking the CAN_ID is CANFD or not and set the max DLC for CANFD.
the can_id is like 0x40000123 (0x123 + 0x40000000). But the CAN_CANFD_MASK is 0x4000 in MCAL. The sourcecode makes a judge the can_id is CANFD or not by masking can_id with CAN_CANFD_MASK. Because MASK is not uint32 (0x40000000), the masking value is always FALSE.
CAN_CANFD_MASK might be 0x40000000.
I manually change that value and it works well.
I suggest you simulate this on your bench. It must be easier and clearer than I explain to you.
Looks like there's some problem here. I tried downloading MPC574XG_MCAL4_2_RTM_HF24_1_0_0 package and didn't see anything like your details.
The first, you say that CAN_CANFD_MASK is defined in Can_GeneralTypes.h. But I don't see that on my side. I also tried searching according to the information based on the image you sent below, but also did not find the same thing in my package:
Checking in the package from my side, I see Can driver is using another definition and it is correct:
So are you sure you are using MPC574XG_MCAL4_2_RTM_HF24_1_0_0? And is it original package by NXP or has there been any updates on it?