<div dir="ltr">Hi Joel<div> I think you are right, it is a complete reset. I don't know the reason for the system reset. My test code is as below. System will reset after about 40min.</div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><stdlib.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><stdio.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><termios.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><fcntl.h></span><span style="color:rgb(86,156,214)"> </span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><unistd.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><errno.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><string.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><rtems/error.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><rtems/libio.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><rtems/stackchk.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><libchip/chip.h></span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><bsp.h></span></div><br><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">PORT</span><span style="color:rgb(86,156,214)"> </span><span style="color:rgb(206,145,120)">"/dev/ttyUART1"</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">PIN_UART1_RXD</span><span style="color:rgb(86,156,214)"> {PIO_PA5C_URXD1, PIOA, ID_PIOA, PIO_PERIPH_C, PIO_DEFAULT}</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">PIN_UART1_TXD</span><span style="color:rgb(86,156,214)"> {PIO_PA4C_UTXD1, PIOA, ID_PIOA, PIO_PERIPH_C, PIO_DEFAULT} </span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">PIN_LED_0</span><span style="color:rgb(86,156,214)"> {PIO_PC9, PIOC, ID_PIOC, PIO_OUTPUT_1, PIO_DEFAULT}</span></div><br><div><span style="color:rgb(86,156,214)">const</span> Pin pins<span style="color:rgb(86,156,214)">[]</span> = { <span style="color:rgb(86,156,214)">PIN_UART1_RXD</span>, <span style="color:rgb(86,156,214)">PIN_UART1_TXD</span>, <span style="color:rgb(86,156,214)">PIN_LED_0</span> };</div><br><div>rtems_task task_send( rtems_task_argument task_index )</div><div>{</div><div> <span style="color:rgb(86,156,214)">char</span>* send_string = <span style="color:rgb(206,145,120)">"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"</span>; <span style="color:rgb(106,153,85)">/* character count : 400 */</span></div><div> <span style="color:rgb(86,156,214)">int</span> index = <span style="color:rgb(181,206,168)">1</span>;</div><br><div> rtems_status_code sc = rtems_termios_bufsize( <span style="color:rgb(181,206,168)">512</span>, <span style="color:rgb(181,206,168)">512</span>, <span style="color:rgb(181,206,168)">512</span> ); </div><div> <span style="color:rgb(86,156,214)">if</span> (sc > <span style="color:rgb(181,206,168)">0</span>) {</div><div> perror(<span style="color:rgb(206,145,120)">"rtems_termios_bufsize(): failed \n"</span>);</div><div> }</div><div> </div><div> <span style="color:rgb(86,156,214)">int</span> fd = open(<span style="color:rgb(86,156,214)">PORT</span>, <span style="color:rgb(86,156,214)">O_RDWR</span>);</div><div> <span style="color:rgb(86,156,214)">if</span> (fd < <span style="color:rgb(181,206,168)">0</span>) {</div><div> perror(<span style="color:rgb(206,145,120)">"open(): failed to open /dev/ttyUART1 \n"</span>);</div><div> }</div><div><br></div><div> <span style="color:rgb(86,156,214)">while</span> (<span style="color:rgb(181,206,168)">1</span>) {</div><div> <span style="color:rgb(86,156,214)">int</span> len = write(fd, send_string, <span style="color:rgb(181,206,168)">200</span>);</div><div> <span style="color:rgb(86,156,214)">if</span> (len < <span style="color:rgb(181,206,168)">0</span>) {</div><div> perror(<span style="color:rgb(206,145,120)">"write(): failded to write\n"</span>);</div><div> close(fd);</div><div> exit(-<span style="color:rgb(181,206,168)">1</span>);</div><div> } <br></div><br><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_wake_after( rtems_clock_get_ticks_per_second() / <span style="color:rgb(181,206,168)">20</span> ); </div><div> }</div><div>}</div><br><div>rtems_task task_led( rtems_task_argument task_index )</div><div>{</div><div> <span style="color:rgb(86,156,214)">while</span>(<span style="color:rgb(181,206,168)">1</span>) {</div><div> <span style="color:rgb(86,156,214)">if</span> (PIO_GetOutputDataStatus(&pins[<span style="color:rgb(181,206,168)">2</span>]))</div><div> PIO_Clear(&pins[<span style="color:rgb(181,206,168)">2</span>]);</div><div> <span style="color:rgb(86,156,214)">else</span></div><div> PIO_Set(&pins[<span style="color:rgb(181,206,168)">2</span>]);</div><br><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_wake_after( rtems_clock_get_ticks_per_second() ); </div><div> }</div><div>}</div><br><div>rtems_task Init( rtems_task_argument argument )</div><div>{</div><div> rtems_id task_id[ <span style="color:rgb(181,206,168)">4</span> ];</div><div> rtems_name task_name[ <span style="color:rgb(181,206,168)">4</span> ]; </div><div> </div><div> task_name[ <span style="color:rgb(181,206,168)">1</span> ] = rtems_build_name( <span style="color:rgb(206,145,120)">'S'</span>, <span style="color:rgb(206,145,120)">'N'</span>, <span style="color:rgb(206,145,120)">'D'</span>, <span style="color:rgb(206,145,120)">' '</span> );</div><div> task_name[ <span style="color:rgb(181,206,168)">2</span> ] = rtems_build_name( <span style="color:rgb(206,145,120)">'L'</span>, <span style="color:rgb(206,145,120)">'E'</span>, <span style="color:rgb(206,145,120)">'D'</span>, <span style="color:rgb(206,145,120)">' '</span> );</div><div> </div><div> PIO_Configure(pins, PIO_LISTSIZE(pins));</div><br><div> puts(<span style="color:rgb(206,145,120)">"This is the Init Thread.\n"</span>);</div><br><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_create(</div><div> task_name[ <span style="color:rgb(181,206,168)">1</span> ], <span style="color:rgb(181,206,168)">1</span>, RTEMS_MINIMUM_STACK_SIZE * <span style="color:rgb(181,206,168)">4</span>, RTEMS_DEFAULT_MODES,</div><div> RTEMS_DEFAULT_ATTRIBUTES, &task_id[ <span style="color:rgb(181,206,168)">1</span> ]</div><div> );</div><br><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_create(</div><div> task_name[ <span style="color:rgb(181,206,168)">2</span> ], <span style="color:rgb(181,206,168)">2</span>, RTEMS_MINIMUM_STACK_SIZE * <span style="color:rgb(181,206,168)">2</span>, RTEMS_DEFAULT_MODES,</div><div> RTEMS_DEFAULT_ATTRIBUTES, &task_id[ <span style="color:rgb(181,206,168)">2</span> ]</div><div> );</div><br><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_start( task_id[ <span style="color:rgb(181,206,168)">1</span> ], task_send, <span style="color:rgb(181,206,168)">1</span> );</div><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_start( task_id[ <span style="color:rgb(181,206,168)">2</span> ], task_led, <span style="color:rgb(181,206,168)">2</span> );</div><br><div> (<span style="color:rgb(86,156,214)">void</span>) rtems_task_delete( RTEMS_SELF );</div><div>}</div><br><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER</span></div><br><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_MICROSECONDS_PER_TICK</span><span style="color:rgb(86,156,214)"> </span><span style="color:rgb(181,206,168)">10000</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_TICKS_PER_TIMESLICE</span><span style="color:rgb(86,156,214)"> </span><span style="color:rgb(181,206,168)">5</span></div><br><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_MAXIMUM_FILE_DESCRIPTORS</span><span style="color:rgb(86,156,214)"> </span><span style="color:rgb(181,206,168)">10</span></div><br><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_INIT_TASK_STACK_SIZE</span><span style="color:rgb(86,156,214)"> (</span><span style="color:rgb(181,206,168)">2</span><span style="color:rgb(86,156,214)"> </span>*<span style="color:rgb(86,156,214)"> RTEMS_MINIMUM_STACK_SIZE)</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_EXTRA_TASK_STACKS</span><span style="color:rgb(86,156,214)"> (</span><span style="color:rgb(181,206,168)">4</span><span style="color:rgb(86,156,214)"> </span>*<span style="color:rgb(86,156,214)"> RTEMS_MINIMUM_STACK_SIZE)</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_MAXIMUM_TASKS</span><span style="color:rgb(86,156,214)"> </span><span style="color:rgb(181,206,168)">5</span></div><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_RTEMS_INIT_TASKS_TABLE</span></div><br><div><span style="color:rgb(86,156,214)">#define </span><span style="color:rgb(86,156,214)">CONFIGURE_INIT</span></div><div><span style="color:rgb(86,156,214)">#include </span><span style="color:rgb(206,145,120)"><rtems/confdefs.h></span></div></div></div><div><br></div><div>Thanks</div><div>Daniel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 27, 2020 at 7:52 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</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="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 27, 2020, 2:33 AM Daniel Li <<a href="mailto:ludvig.lee@gmail.com" target="_blank">ludvig.lee@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 class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr">Hello world<div><br></div><div>I'm using RTEMS5 as an uart2udp converter. I'm observing a task restart when I send bytes to uart for a long time ( for 20min @
about 200 bytes/s
), and there is no error reported. I don't know how to overcome, anyone encountered this problem?</div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Are you sure it isn't a complete reset? That would make more sense to me as a possibility.</div><div dir="auto"><div class="gmail_quote"><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 class="gmail_quote"><div dir="ltr"><div><br></div><div>Thanks</div><div><br></div><div>Daniel</div><div><br></div><span style="font-family:arial,sans-serif;font-size:28px;white-space:pre-wrap;background-color:rgb(248,249,250)"></span></div>
</div></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" rel="noreferrer" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a></blockquote></div></div></div>
</blockquote></div>