Asaf Shelly
2010-09-03 08:58:06 UTC
Hi All,
I have a driver using COM port internally. I need accurate read timing so I
am reading bytes one by one.
I start with reading a single byte and on read completion I am sending
another request for the next byte.
The flow of execution is so that if there are a few bytes pending every read
will complete immediately before function return, like this:
Two Single Bytes:
Read (1)
Read (1) Completion invoked
- Read (2)
Read (1) Completion done
Read (2) Completion invoked
- Read (3)
Read (2) Completion done
Multiple Bytes pending:
Read (1)
Read (1) Completion invoked
- Read (2)
- Read (2) Completion invoked
- Read (3)
- - Read (3) Completion invoked
- - - Read (4)
- - - Read (4) Completion invoked
- - - - Read (5)
- - - Read (4) Completion done
- - Read (3) Completion done
- Read (2) Completion done
Read (1) Completion done
When I have about 30 bytes pending the system will reset / hang. I'm using
Virtual PC with Windows XP SP2.
Any solution / design methodology are welcome.
TIA,
Asaf
I have a driver using COM port internally. I need accurate read timing so I
am reading bytes one by one.
I start with reading a single byte and on read completion I am sending
another request for the next byte.
The flow of execution is so that if there are a few bytes pending every read
will complete immediately before function return, like this:
Two Single Bytes:
Read (1)
Read (1) Completion invoked
- Read (2)
Read (1) Completion done
Read (2) Completion invoked
- Read (3)
Read (2) Completion done
Multiple Bytes pending:
Read (1)
Read (1) Completion invoked
- Read (2)
- Read (2) Completion invoked
- Read (3)
- - Read (3) Completion invoked
- - - Read (4)
- - - Read (4) Completion invoked
- - - - Read (5)
- - - Read (4) Completion done
- - Read (3) Completion done
- Read (2) Completion done
Read (1) Completion done
When I have about 30 bytes pending the system will reset / hang. I'm using
Virtual PC with Windows XP SP2.
Any solution / design methodology are welcome.
TIA,
Asaf