I modified an official example of flexcan to apply to my own development board.The MCU on the development board is S32K146. My tools are matlab 2019a, MBD toolbox s32k v4.1.0 , S32 Design Studio for ARM Version 2018.R1 and J-link.The model is
shown in the figure below：
Build the Simulink model as normal. Open S32DS and select Import/S32 Design Studio/ProjectInfo.xml Importer.
Then select the ProjectInfo.xml from the location used to generated the C code for the Simulink model. Also, select the ARM32 Executable option.
Open the debug configuration interface by default.Because I use J-link, I closed the interface first and build the project:
I found a configuration from “How to export Generated Code to S32 Design Studio IDE (applicable for MBDT for MPC5744P v2.0)”.
But there's only one similar, I choose the following:
Because my development board uses an external 16MHz crystal oscillator,so I modified the clock profile as shown in the figure below:
Now the project builded successfully:
Next, I configure debug as follows:
I started to debug the project.It seems to work,but I can't get the data.I'm not familiar with hardware,who can tell me what's wrong?
I exported the project.
Thanks for the help,