Dear @robertv
I hope you are well. I have built a MBDT Can transmit model mimicking the Can Transmit 342 S32CT example model in the Simulink library. However, when I observe it in Freemaster, the status of the Can_Write module is 2, which means the buffer is full or busy.
The model uses FlexCAN6 for transmitting, and I have initialized the TJA1443 which is the can transceiver for S32K358. I have also attached the file of my model. I couldn't see why my model is not working. Could you please help me to see where the issue is?
Many thanks,
Xiaomei
Hello @XH ,
Unfortunately, the Model-Based Design Toolbox does not currently provide CAN communication support on the S32K358-Q172 board, so the alternative is creating the configuration from scratch to enable the CAN functionality.
I downloaded your model and looked at the configuration project attached. I have not found any issues with the way the pins have been configured/the components added/interrupts/clocks. I also did not see any problems with the model either.
Still, I'd have a few general suggestions that may help:
1) Have you tried configuring the Can Segments like they are in the RTD example? The Can example for S32K358 in RTD is also configured to run at 24MHz, but with these Can Segment values instead.
2) Have you tried setting the FLEXCAN_6 clock to different values?
3) Have you tried a different FLEXCAN instance? That would help us understand if the problem is specific to FLEXCAN_6 or if perhaps there's something that is not properly configured in the current context.
I also recommend deleting the modelName_Config, modelName_ert_rtw and modelName.slxc folders and files, to make sure that the generated code corresponds to your latest changes inside the model and configuration project.
I hope that going through these suggestions will at least provide us with more information, if they don't end up fixing the issue. At that point we will search for more targeted actions, to try and get the model to work as expected.
Regards,
Robert V