From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 24 Apr 2019 13:05:46 +0000 From: Jeff Webb Reply-To: Jeff Webb Subject: Re: rt_dev_send() stalls periodic task Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "xenomai@xenomai.org" > The only difference in the serial configuration between that cross-link.c > app and my app was : > struct rtser_config : > .rx_timeout =3D RTSER_DEF_TIMEOUT // infinite , no stal= l for > many hours in cross-link.c > versus: > .rx_timeout =3D 500000 // 500us, stalls within an hour = in my > app > I don't know why an RX setting affects TX behavior. I also can't use > RTSER_DEF_TIMEOUT in my application or it dies when it starts up - no clu= e > why. But I did try setting > .rx_timeout =3D 5000000 // 5 ms. my app doesnt stall for seve= ral > hours This may not be related, but this jogged my memory about a problem I had ye= ars ago regarding rx/tx timeouts affecting the other operation. I just too= k a look at rt_16550_write(), and I see: rtdm_toseq_init(&timeout_seq, ctx->config.rx_timeout); /* Make write operation atomic. */ ret =3D rtdm_mutex_timedlock(&ctx->out_lock, ctx->config.rx_timeout, &timeout_seq); This is the same code as in *_read(). I am wondering if this is a cut and = paste error. It seems like these two lines should use tx_timeout instead, = but I haven't looked into the code in detail. Maybe this is related, or ma= ybe another bug? Thanks, -Jeff Webb