Now I develop in S32R272 and I need to receive some CAN messages with DLC64 and a diagnostic message with DLC8, this diagnostic message is used for UDS function.
1.I config the payload size to 64 with CAN FD,then set the diagnostic request/response CAN message with DLC8;
2.I use CANoe transmit a diagnostic request message with DLC8 and waiting the ecu to receive this diagnostic request;
3.I find that when receive the DLC8 message, software stop run. I don't know why it happened.
If payload size was configured to 64, all received message's DLC should equal to 64?
Can I set the mixed dlc messages?
Ps: If the ECU has ever received/transmitted a 64byte can message, then receive a 8 byte message, it works normal.
If the ECU has never received/transmitted a 64byte can message, it stop working when received a 8 byte message first time.
I do not know s32r272 device, should it be s32r372?
Anyway; mixed DLC messages are possible. Base on your PS message it looks this is due to insufficient FlexCAN memory initialization when ECC is enabled. By default this ECC is enabled and proper memory init must be done as stated in RM's "Detection and Correction of Memory Errors" chapter.
After I set CAN_MECR->ECCDIS to 1, ECU works well. It can receive DLC8 diagnostic request message and response ok.
Will it cause other problems if I set ECCDIS to 1?
no, just the error detection and correction mechanism will be disabled.
Thank you very much.The device is S32R274.
The FlexCAN memory is too small? Where can I set the memory?