2019-08-01 12:31 AM
Hello!
I have installed the STM32-MAT/TARGET toolbox.My operating environment:
matlab 2018b
STM32CubeMX 5.1.0
STM32-MAT/TARGET 5.1.0
There are two question about CAN communication example!
There is a error about CAN_IT module as follows when I simulate the CAN communication example in STM32demos.
I have tryed to solve this error.However,It seems that we need to modify S-function.But the S-function is saved as .p file,we can't view and modify.
I want to delete CAN_IT module and simulate in polling mode.However,it still can't send or recieve CAN messege.The CAN state which gets from CAN_Get_State module is always “reset�?.
The attached are the Simulink model and the .ioc configuration file for STM32CubeMX of question 1 and question 2.
Please any help! Thank you!
Solved! Go to Solution.
2019-08-19 06:50 AM
Hi Anjie ****,
sorry for the late answer.
STM32-MAT/TRAGET does not support simulation but code generation only for STM32 devices.
So, CAN blocks drivers can't be used for Simulation but for code generation only.
We reproduce the issue when we press Run button on the Simulink toolbar instead of the Build Model button.
Using the Build button, Build process completed successfully
And can be compiled with IDE.
Then, only execution on the target failed due TX FIFO full (due to changes in the RX filter in your application).
Hopping it clarifies the situation you met.
Regards.
Pascal & Cyril
2019-08-19 06:50 AM
Hi Anjie ****,
sorry for the late answer.
STM32-MAT/TRAGET does not support simulation but code generation only for STM32 devices.
So, CAN blocks drivers can't be used for Simulation but for code generation only.
We reproduce the issue when we press Run button on the Simulink toolbar instead of the Build Model button.
Using the Build button, Build process completed successfully
And can be compiled with IDE.
Then, only execution on the target failed due TX FIFO full (due to changes in the RX filter in your application).
Hopping it clarifies the situation you met.
Regards.
Pascal & Cyril