<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On 2022-December-19, at 19:59, <a href="mailto:tianye@sugon.com" class="">tianye@sugon.com</a> wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font face="Verdana, Arial, Helvetica, sans-serif" class="">Hi:</font><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="white-space:pre" class="">        </span><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class="">I have a testcode, it will lead to uart print space forever.</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><br class=""></span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class="">Demo code like this:</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">  </span>Init()</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">    </span>{</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">         </span>create a task;</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">            </span>start this task;</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">          </span><b class="">printf("%*\n");</b></span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class="">                while(1) { </span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">                        </span>sleep()</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class="">           </span>}</span></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif;" class=""><span style="font-family: courier, "courier new", monospace; font-size: 14px; white-space: pre-wrap;" class=""><span style="white-space:pre" class=""> </span>}</span></div></font></div></blockquote><br class=""></div><div class="">What are you expecting get? The * tells printf that there will be a parameter following that will give you the length of the subsequent parameter. Usually of the format %*s, length, string.</div><div class="">I’m pretty sure that you don’t have a proper format string, it’s missing the item that you should be specifying the length for and then you neither have the length nor the item to be printed.</div><br class=""><div class="">What are you trying to do?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">A</div><br class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">---------------------</div><div class="">Andrei Chichak</div><div class=""><br class=""></div></div></span></div></span></div></span></div></span></div></span></div></span></div></div></div></div></div></div></div></div></body></html>