<div dir="ltr">is there someone could help me<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 30, 2019 at 2:36 PM Jython <<a href="mailto:googcheng@gmail.com">googcheng@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>a 21ms counter in fact more than 10s, see log , my rtc 10s wake up<br></div><div><br></div><div>static void Delay_ms(x) <br>{<br> #if 0<br> int int_num = 0;<br><br> if(x % 10 == 0)<br> {<br> int_num = x / 10;<br> }<br> else<br> {<br> int_num = x / 10 + 1;<br> }<br> //printf("delay x %d int_num %d\n", x, int_num);<br> rtems_task_wake_after(int_num);<br> #endif<br> volatile int i;<br> int us_cnt = 1000*x;<br> printf("delay x %dms us_cnt %d\n", x, us_cnt);<br> for(i = 0; i < us_cnt; i++)<br> rtems_counter_delay_nanoseconds(1000);<br><br> printf("end delay\n");<br>}</div><div><br></div><div><br></div><div>[14:33:18.242]ÊÕ¡û¡ôflash_buf 32 00 00 00 <br>write page index 50<br>log_page_no = 50<br>before while<br>loop begin<br>dtr set 0<br>baud 9600 at UART1_ChangeBaud<br>USART_WordLength_8b<br>USART_StopBits_1<br>delay x 21ms us_cnt 21000<br><br>[14:33:21.055]ÊÕ¡û¡ôafter clr isr 00000033<br><br>[14:33:31.056]ÊÕ¡û¡ôafter clr isr 00000033<br><br>[14:33:32.759]ÊÕ¡û¡ôend delay<br>Lenggui_ClrBuffer begin okflag 0</div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div>