STM32F4 PiL simulation very very slow

5 次查看(过去 30 天)
Hello, i ask here for understand the Pil...
I've build a motion control example, for generate gates signals for a inverter that drive a pmsm.
in a normal mode simulation, simulink finish the 1.8 seconds of simulation in 1m30sec. If i start a pil the simulation finish to run in about 7 hours! I not understant this difference. Is a problem of the implemented motion control (sin, cos functions) in only 180Mhz core, or of the transter of data? setted to 115200 bauds and 8Mhz, standard speeds that give the tools..? can any one explain me or give a reference to study? i've googled but i've not found the answer

回答(1 个)

Antonio Acampora
Antonio Acampora 2020-7-1
after other 2 freezed simulation, i’ve received some output, but..... i not understand. Someone know if are good times?
In a Top model i’ve set the inverter block at frequency of 8Khz.
If the average time execution time (i suppose it’s the time taken from the input of all the references, to the output for the gates) is 50178 nano_seconds and the switching period is Psw=1/8Khz=125 micro_seconds, i have: 50,178micro_sec < 125 micro_sec, i can tell thet the code work fine on the STM32?
Someone can explain me if is correct?
  1 个评论
Allali Hasnaa
Allali Hasnaa 2021-6-15
Hello,
I'm dealing with the same problem, did you find out anything ?
Thank you.

请先登录,再进行评论。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by