Re: Strange timing when reading from the serial port

2009-08-07 Thread Chris Stankevitz
Chris Stankevitz wrote: Q: What is the source of the alternating +/- 5ms bias that comes and goes every few seconds? This helps: add these lines to /boot/device.hints and reboot hint.sio.0.flags=0x20 hint.sio.1.flags=0x20 Chris ___

Strange timing when reading from the serial port

2009-08-06 Thread Chris Stankevitz
Hello, I have a device that sends one byte over the serial line every 10ms. Using c, I wrote an application that opens the serial port and reads bytes in an infinite loop. I disabled all blocking (O_NONBLOCK, VMIN=0, VTIME=0, B115200). My CPU spends ~100% of its time calling read() [which