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.

[参考译文] TMS320F28027:如何处理接收到 SCI 的数据

Guru**** 2595805 points
Other Parts Discussed in Thread: CONTROLSUITE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/674236/tms320f28027-how-to-process-data-received-to-sci

器件型号:TMS320F28027
Thread 中讨论的其他器件:controlSUITE

这是一个学校项目。 我正在尝试从 SCI 接收数据。 我将使用基于 controlSUITE V230 API 的示例。  

if (SCI_getRxFifoStatus (mySCI)!= SCI_FifoStatus_empty)
{
uint16_t ReceivedChars [4];
uint16_t i = 0;
while (SCI_getRxFifoStatus (mySci)!= SCI_FifoStatus_empty){
ReceivedChars[i++]= SCI_getData (mySci);
}

} 

通过在调试器中观察 ReceivedChars、返回的值不一致。 我知道终止字符会导致问题、但我希望第一个字符是通过串行发送的字符。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    数据通过 Termite 使用 ENTER 键发送
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    射线、

    您的意思是这些字符不一致? 您看到的行为是什么?

    此外、请确保您的器件和 PC 配置为相同的波特率。

    此致、
    SAL