• 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
返回

电子发烧友 电子发烧友

  • 全文搜索
    • 全文搜索
    • 标题搜索
  • 全部时间
    • 全部时间
    • 1小时内
    • 1天内
    • 1周内
    • 1个月内
  • 默认排序
    • 默认排序
    • 按时间排序
  • 全部板块
    • 全部板块
大家还在搜
  • 使用PSoC 3 UART函数获取数据出错

    你好,我使用PSoC 3 UART函数,在简单的应用程序中获取数据似乎有问题。如果我使用一个终端窗口,输入文字,一切工作正常但如果iprogrammatically发送一个字符串,它的FIFO的包裹和LF风在缓冲区中的第一个字符。我要做的就是读状态时看到的字符是(uart_1_rx_sts_fifo_notempty),然后进入一个循环的例子几乎相同的datasheet.that把所有的字符直到cr-lf。.我已经把uart_1_getrxbuffersize()是否超过一个字符来了但是我看到不止一次。有什么想法可以阻止我进行黑客攻击和猜测吗?当做,尼克 以上来自于百度翻译 以下为原文Hi, I'm using the PSoC 3 UART function and seem to be having problems getting the data in a simple application. If I am using a terminal window to type characters, everything works fine but if I programmatically send a string, it appears that the FIFO wraps around and the LF winds up in the first character in the buffer. What I tried to do is read the status to see when a character comes in (UART_1_RX_STS_FIFO_NOTEMPTY), then go into a loop almost identical to the example in the datasheet.that takes all the characters until the CR-LF. . I have put a UART_1_GetRxBufferSize() to see if more than one character has arrived but I never see more than one at a time. Any ideas to prevent me from days of hacking and guessing? Regards, Nick

    2019-07-24 12:36