Re: rt_dev_send() stalls periodic task

2019-04-26 Thread Jan Kiszka via Xenomai
On 26.04.19 02:59, C Smith wrote: > On Thu, Apr 25, 2019 at 1:23 AM Jan Kiszka > wrote: > > On 25.04.19 09:15, C Smith wrote: > > Hi Jan, > > > > Your patch worked somewhat but not completely. It prevents my app from > stalling > >

Re: rt_dev_send() stalls periodic task

2019-04-25 Thread C Smith via Xenomai
On Thu, Apr 25, 2019 at 1:23 AM Jan Kiszka wrote: > On 25.04.19 09:15, C Smith wrote: > > Hi Jan, > > > > Your patch worked somewhat but not completely. It prevents my app from > stalling > > forever, but I caugh the serial transmission itself stalling on the > oscilloscope > > for quite a long

Re: rt_dev_send() stalls periodic task

2019-04-25 Thread Jeff Webb via Xenomai
‐‐‐ Original Message ‐‐‐ On Wednesday, April 24, 2019 9:36 AM, Jan Kiszka wrote: > On 24.04.19 15:05, Jeff Webb via Xenomai wrote: > > > > The only difference in the serial configuration between that cross-link.c > > > app and my app was : > > > struct rtser_config : > > > .rx_timeout =

Re: rt_dev_send() stalls periodic task

2019-04-25 Thread Jan Kiszka via Xenomai
On 25.04.19 09:15, C Smith wrote: Hi Jan, Your patch worked somewhat but not completely. It prevents my app from stalling forever, but I caugh the serial transmission itself stalling on the oscilloscope for quite a long time. My 72 byte TX packet from the xenomai periodic task gets cut in

Re: rt_dev_send() stalls periodic task

2019-04-25 Thread C Smith via Xenomai
Hi Jan, Your patch worked somewhat but not completely. It prevents my app from stalling forever, but I caugh the serial transmission itself stalling on the oscilloscope for quite a long time. My 72 byte TX packet from the xenomai periodic task gets cut in half and there is no transmission for

Re: rt_dev_send() stalls periodic task

2019-04-24 Thread Jan Kiszka via Xenomai
On 24.04.19 15:05, Jeff Webb via Xenomai wrote: 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:

Re: rt_dev_send() stalls periodic task

2019-04-24 Thread Jeff Webb via Xenomai
> 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= 50 // 500us, stalls

Re: rt_dev_send() stalls periodic task

2019-04-24 Thread C Smith via Xenomai
Thanks very much Jan, I'll try your patch tomorrow. In the meantime it may confirm your suspicions to hear this : I hacked the xeno_16550A.c driver to poll the transmit buffer every time there was an RX interrupt (I have a bidirectional application). If there was any data waiting just call the TX

Re: rt_dev_send() stalls periodic task

2019-04-23 Thread Jan Kiszka via Xenomai
On 22.04.19 08:45, Jan Kiszka via Xenomai wrote: > On 22.04.19 08:40, C Smith via Xenomai wrote: >> Thanks for your insight, Steve. I didn't realize rt_dev_write() doesnt >> actually stall until it is called many times and the 4K TX buffer gets >> full. (is that right Jan?) >> It that is the case,

Re: rt_dev_send() stalls periodic task

2019-04-22 Thread Steve Freyder via Xenomai
On 4/22/2019 5:56 PM, C Smith wrote: Please don't think the cross-link.c app config has the magic answer. Changing RX timeouts to prevent TX stalls would be an open loop hack that might fail the serial traffic jitters differently. The most suspicious difference between the two apps is that :

Re: rt_dev_send() stalls periodic task

2019-04-22 Thread C Smith via Xenomai
Please don't think the cross-link.c app config has the magic answer. Changing RX timeouts to prevent TX stalls would be an open loop hack that might fail the serial traffic jitters differently. The most suspicious difference between the two apps is that : cross-link.c behaves very regularly in

Re: rt_dev_send() stalls periodic task

2019-04-22 Thread Steve Freyder via Xenomai
On 4/22/2019 2:51 PM, Steve Freyder via Xenomai wrote: On 4/22/2019 1:45 AM, Jan Kiszka wrote: On 22.04.19 08:40, C Smith via Xenomai wrote: Thanks for your insight, Steve. I didn't realize rt_dev_write() doesnt actually stall until it is called many times and the 4K TX buffer gets full. (is

Re: rt_dev_send() stalls periodic task

2019-04-22 Thread Steve Freyder via Xenomai
On 4/22/2019 1:45 AM, Jan Kiszka wrote: On 22.04.19 08:40, C Smith via Xenomai wrote: Thanks for your insight, Steve. I didn't realize rt_dev_write() doesnt actually stall until it is called many times and the 4K TX buffer gets full. (is that right Jan?) It that is the case, sure I could find a

Re: rt_dev_send() stalls periodic task

2019-04-22 Thread Jan Kiszka via Xenomai
On 22.04.19 08:40, C Smith via Xenomai wrote: Thanks for your insight, Steve. I didn't realize rt_dev_write() doesnt actually stall until it is called many times and the 4K TX buffer gets full. (is that right Jan?) It that is the case, sure I could find a way to check the TX buffer fill level to

Re: rt_dev_send() stalls periodic task

2019-04-22 Thread C Smith via Xenomai
Thanks for your insight, Steve. I didn't realize rt_dev_write() doesnt actually stall until it is called many times and the 4K TX buffer gets full. (is that right Jan?) It that is the case, sure I could find a way to check the TX buffer fill level to prevent my app from stalling. I rewrote the

Re: rt_dev_send() stalls periodic task

2019-04-21 Thread Steve Freyder via Xenomai
On 4/20/2019 11:33 PM, C Smith via Xenomai wrote: Per your suggestion, I added code to call this ioctl, right after the rt_dev_write() : rt_dev_ioctl(fd_tty[1], RTSER_RTIOC_GET_STATUS, _status); I let the transmit stall again, then attached with a gdb, which allows me to step forward to the

Re: rt_dev_send() stalls periodic task

2019-04-20 Thread C Smith via Xenomai
Per your suggestion, I added code to call this ioctl, right after the rt_dev_write() : rt_dev_ioctl(fd_tty[1], RTSER_RTIOC_GET_STATUS, _status); I let the transmit stall again, then attached with a gdb, which allows me to step forward to the ioctl: serial_status.line_status was 96 decimal,

Re: rt_dev_send() stalls periodic task

2019-04-18 Thread Jan Kiszka via Xenomai
On 18.04.19 08:42, C Smith wrote: On Tue, Apr 16, 2019 at 1:03 AM Jan Kiszka > wrote: > The serial device is set up this way: > struct rtser_config serial_config = { >          .config_mask       = 0x, >          .baud_rate         =

Re: rt_dev_send() stalls periodic task

2019-04-18 Thread C Smith via Xenomai
On Tue, Apr 16, 2019 at 1:03 AM Jan Kiszka wrote: > > The serial device is set up this way: > > struct rtser_config serial_config = { > > .config_mask = 0x, > > .baud_rate = 115200, > > .parity= RTSER_NO_PARITY, > > .data_bits

Re: rt_dev_send() stalls periodic task

2019-04-16 Thread Jan Kiszka via Xenomai
On 15.04.19 19:28, C Smith via Xenomai wrote: My Xenomai periodic routine normally runs for days at a time on most motherboards, but it is spontaneously getting stuck forever in rt_dev_write(). This is a write to a xeno_16550A driver serial port. I must use this brand of motherboard, where the

rt_dev_send() stalls periodic task

2019-04-15 Thread C Smith via Xenomai
My Xenomai periodic routine normally runs for days at a time on most motherboards, but it is spontaneously getting stuck forever in rt_dev_write(). This is a write to a xeno_16550A driver serial port. I must use this brand of motherboard, where the first serial port (rtser0 0x3f8 irq 4) does not