This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] DSP 28379d 和 MATLAB/Simulink C Mex 函数之间的串行通信

Guru**** 2540720 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/953875/serial-communication-between-dsp-28379d-and-matlab-simulink-c-mex-function

当使用 C Mex 函数在 DSP F28379d 和 MATLAB / Simulink 之间使用串行通信时、某些时刻会在接收到的控制变量中显示错误。

对于串行端口的读取和写入、我使用命令"serialSendBuff (unsigned char *)&ID_bits、2"和"serialReceiveBuff ((unsigned char *)&Vd_bits、2)"。

在这种情况下、确定错误并加以纠正的最佳策略是什么?

我看到两种选择。 第一个替代方法是使用变量上一步中的值、但有错误。 第二种方法是让 DSP 重新发送这些变量?

还有其他可能性吗? 最常见的做法是什么?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Otavio、

    我们正在与 MathWorks 团队进行核实。 我们应该能够在明天作出反应。