Looking for a F28379D controller internal system reset command via Simulink

4 次查看(过去 30 天)
I have a TI F28379 microcontroller that I am using for something similar to a PLL to allow me to adjust the phase of an input signal and to produce a second waveform which is 90 deg out of phase from the input. My problem is that this circuit degrades over time (as seen below). I have been using the external 'S3 Reset' button to correct the issue, but need a better solution. Is there a way to activate the S3 Reset input via Simulink or, possibly, 'reset' this part of the circuit using a timer?

回答(1 个)

Antonin
Antonin 2020-10-16
My gut feeling tells me that this could be a problem related to float math losing resolution as the time increases.
Few points:
  • C2000 only uses single precision floating point, while your simulation uses 'double' by default. I suggest removing the use of 'double' in your model as it will map to single in the generated code.
  • Can you remove the clock block and replace it with a rolling counter? The clock block will continue to increase towards infinity and eventually lose resolution with the single precision floating point data type. The resolution depends on the other operands and I see a divider by .805e7 which will probably lead to small numbers. This is going to be challenging for the floating point data type. Having a clock that continuously increases towards infinity is not a good idea. For a PLL, I would assume that you should be able to use a rolling counter.
  • Make sure that you are not using continuous time in your model. Discrete is better for emmbedded applications. While enabling sample time colors, you shouldn't see any black in your model.
I hope it helps,
Let me know,
Thanks,
Antonin.

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by