Hi,
I'm deploying the attached model (I know it's hideously messy) onto an MPC5744P, but in PCAN it's only able to pick up a single transmission of message 0x101. No other activity is recorded.
Any solutions/ideas would be greatly appreciated.
Thanks,
Crispin
Hi @mariuslucianand,
I've found the issue with message 0x105 not being transmitted; the Bus load peaked at 99% according to CANalyzer, so I changed the transmission time of message 0x003 from 2ms to 5ms and now message 0x105 is being transmitted.
The changes due to the Multiplex message aren't being picked up however, but I guess this'll be an issue to take up with The Mathworks?
Thanks,
Crispin
Hi @mariuslucianand ,
Yes; I'm using 3.2.0.
Thank you for this; the messages 0x101, 0x102, 0x103 & 0x104 are now transmitted on the CAN Bus at the correct intervals.
However, message 0x105 isn't being transmitted at all. Also, when I change the contents of message 0x003 (it's a Multiplex CAN Message), the resultant signal changes aren't registered in the messages being transmitted by the DEVKIT.
Model & DBC File attached for reference.
Thanks,
Crispin
Hello @C_Zuercher_APR ,
First of all, which version of our toolbox are you using? Is it MPC57xx 3.2.0?
I will try to guide you through what I've seen in the generated code.
First, there is an issue with how Simulink generates the code. As you see in the below image, for all 5 Message Tx Subsystems, Simulink generates a single function in which it will send only the 0x101 message-Id.
To solve this, you have to right-click on every Message Tx subsystem, select Block Parameters (Subsystem), go to Code Generation, and for the Function packaging select Nonereusable function
This will generate a function for each send block with the right message Ids.
Now, the second thing I see here is related to the FCAN_Receive block. This has to be called only once at the initialization and then retriggered every time in the interrupt to "rearm" the receiver. Now, basically you "arm" the receiver every 0.002s, in the step function. You can have a look inside the flexcan_slave_mpc574x example.
Also, make sure that if everything works, you have enough time to send all the 5 messages in the 0.002s.
Please give this a try and see if something has been changed.
Hope this helps,
Marius