<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[串口发送卡在检测发送完成]]></title><description><![CDATA[<p dir="auto">如下调试打印的函数：</p>
<pre><code>    1 int board_uart_putc(uint8_t c)
    2 {
    3     REG32(LINFLEXD3_UART_DATA0_8) = c;
    4
    5     while ((REG32(LINFLEXD3_UARTSR) &amp; 0X02) == 0X0);
    6
    7     REG32(LINFLEXD3_UARTSR) |= 0X02;
    8     return 0;
    9 }
</code></pre>
<p dir="auto">会不会存在一种情况，数据发送出去了，但是一直卡在循环 <code>while ((REG32(LINFLEXD3_UARTSR) &amp; 0X02) == 0X0);</code><br />
我调试的时候发现的：<br />
<img src="https://yt-static-main.oss-cn-shanghai.aliyuncs.com/nodebb/1472/934f2814-fe28-4108-a223-3cfab0a6a1f7.png" alt="2026-06-02_22-04.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">可以看到 2 实际已经发送出来了，但是还是卡在 while 循环这里。</p>
]]></description><link>https://forum.ytmicro.com/topic/1993/串口发送卡在检测发送完成</link><generator>RSS for Node</generator><lastBuildDate>Tue, 02 Jun 2026 18:01:07 GMT</lastBuildDate><atom:link href="https://forum.ytmicro.com/topic/1993.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 02 Jun 2026 14:06:54 GMT</pubDate><ttl>60</ttl></channel></rss>