Hello,
I am facing a problem when attaching the flexcan module toolbox items, something with the tlc file. even when I attach the example of (FCAN Interrupts) into an empty simulink project. it still gives me the following error :
Error: Inside: EXPRESSION Line: 1 Column: 3 File: C:\Users\MyUser\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_IMXRT1xxx\mbdtbx_imxrt\blocks\fcan\imxrt_fcan.tlc Line: 51 Column: 11 syntax error
this is the line from imxrt_fcan.tlc :
%if (%<LibBlockInputSignal(0, "", "", 0)> <= 2047)
The TLC file couldn't be attached, so I have attached a screenshot instead.
Thank you.
Hello,
I am going to investigate why that error occurs and I will keep you updated.
Best regards,
Sorin Bancila
I changed the model configurations and there were no build errors,
however, I tested the CAN examples and none of them worked!
I uploaded the IDE driver example and viewed the CAN traffic on the logic analyzer there were a traffic on the CAN bus
but for the simulink toolbox example it never worked! what the issue could be ?
* Note: I removed the jumpers 102 and 103, should I do the same for the matlab example or no ?
Hello,
Can you tell me what MATLAB version and Toolbox version are you currently using?
The 'evkmimxrt1170_fcan_transfer' should work out of the box, without any modification to the model or configuration.
On the other hand, 'evkmimxrt1170_fcan_interrupts' example doesn't work out of the box due to a wrong baudrate configuration in the FlexCAN component.
Can you try to run the transfer example and let me know if it works?
Best regards,
Sorin Bancila
I'm using the "evkmimxrt1170_fcan_transfer".
- The MATLAB Version Im using is "R2022b"
- Toolbox version is " 1.3.0".
and it's not working correctly the CANBus traffic is as follows:
So the problem is when using the NXP provided SIMULINK toolbox CAN Block, to send a data on the can bus (disabling loopback mode) the data sent on the bus is incorrect as in the logic analyzer capture I provided earlier.
using the IDE CAN transfer works fine but using the toolbox is not working as it should be.
Thank you.