> The only difference in the serial configuration between that cross-link.c > app and my app was : > struct rtser_config : > .rx_timeout = RTSER_DEF_TIMEOUT // infinite , no stall for > many hours in cross-link.c > versus: > .rx_timeout = 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 clue > why. But I did try setting > .rx_timeout = 5000000 // 5 ms. my app doesnt stall for several > hours
This may not be related, but this jogged my memory about a problem I had years ago regarding rx/tx timeouts affecting the other operation. I just took a look at rt_16550_write(), and I see: rtdm_toseq_init(&timeout_seq, ctx->config.rx_timeout); /* Make write operation atomic. */ ret = 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 maybe another bug? Thanks, -Jeff Webb