Hello everyone,
I'm trying to configure CAN RX with Model-Base S32K144 to receive CAN Ext ID 0x1CECXXXX.
I did the configuration for masking as the picture follows:
So I could receive all IDs that starts with 0x1CEC, but when I debug the model I can see it only accepts 0x1CEC0000, and for example not 0x1CECA232.
Is the masking configuration right? Could someone give me some hints?
Thank you!
Works like charm :smileyhappy:.
Thank you for your support in this issue.
Best Regards,
Vinicius Oliveira.
You are welcome vinicius.oliveira@enfas.de!
I will update our hotfixes patch for S32K available here https://community.nxp.com/thread/489947#comment-1106251.
Thank you again for reporting this issue!
Kind regards,
Razvan.
Hello again vinicius.oliveira@enfas.de,
I have found the culprit - the global Rx mask was set by default 0xFFFFFFFF; so even after setting the individual Rx mask of the MB you wanted to use to 0xFFFF0000, the global mask still overwrites it - after changing this mask, your use-case worked on my end.
Later edit: The problem is with MCR[IRMQ] - individual rx masking and queue enable bit. This controlls if individual rx masking and queue features are enabled or disabled. I have updated the file attached by calling FLEXCAN_DRV_SetRxMaskType function to set Rx masking to individual.
Please find attached here the tlc-file you need to update:
{ROOT_DIR}\mbdtbx_s32k14x\mbdtbx_s32k14x\blocks\fcan\fcan_s32k14_receive.tlc
Please confirm that everything works on your end too.
Thank you for posting this bug with details - that was helpful!
Kind regards,
Razvan.
Hello vinicius.oliveira@enfas.de,
Sorry for the delayed answer, I was caught up with other stuff, but I'm now looking at this issue. I'll probably get back to you tomorrow with my findings.
Thank you for your patience,
Razvan.
Now it complies and flash.
I can see the difference in the code:
But, the issue is the same, if I send 0x1CEC1234 for example it does not recognize it, sending 0x1CEC0000 the global RX_DATA variable is updated.
I have 4 global variables that update its value when any CAN message is received (ID, DATA, LENGTH and TIMESTAMP) and I check this with FREEMaster.
It didnt work, this is the error message while compiling:
\NXP_MBDToolbox_S32K1xx\code\mbdtbx_s32k14x\mbdtbx_s32k14x\blocks\fcan\fcan_s32k14_receive.tlc Line: 61 Column: 28
Values of NULL type cannot be expanded
Hello vinicius.oliveira@enfas.de,
Sorry, I had the fix made for another version. I have attached the file here for the version you have.
Kind regards,
Razvan.
Hello vinicius.oliveira@enfas.de,
The masking configuration is correct, I will take a look and come back soon with a solution for this problem.
Kind regards,
Razvan.
Thank you for the fast response Razvan.
This is how the code looks like:
Hello vinicius.oliveira@enfas.de,
I have come to the same conclusion and I made the changes necessary. Please replace the following file with the one attached here:
{ROOT_DIR}\mbdtbx_s32k14x\mbdtbx_s32k14x\blocks\fcan\fcan_s32k14_receive.tlc
Could you confirm that with this fix everything is working?
P.S.: Thank you for pointing it out and for your advice on the matter. We will be posting it on the https://community.nxp.com/thread/489947 page, in our cumulative patch after we get your feedback and we make some tests internally.
Kind regards,
Razvan.