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.

[参考译文] TMS470MF06607:无字节接收问题

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/871367/tms470mf06607-no-of-bytes-receive-problem

器件型号:TMS470MF06607
主题中讨论的其他器件:HALCOGEN

大家好、我 正在讨论 TMS470M 模块 SCI 概念。 我正在使用中断 通过 sciReceive (sciBASE-t * sci、unsigned long、unsigned char data)接收数据;

我可以 使用 中断方法连续接收给定长度的数据、而不会出现任何问题、但我希望接收可变长度数据、因为我无法预测数据大小(传入)。

请向我推荐解决方案。

此致、

Siva

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

    要接收的字符串是否具有终止字符? 您可以从调用的 HALCoGen 函数 sciReceive()开始,其长度等于您将接收到的最大字符串。 然后修改 sci 中断例程以查找终止字符,并在检测到 sciNotification()函数时调用该函数。