In my project I sometimes read a stream of data from a device attached to a MAX3421E. That part has a couple of 64 bytes FIFO's, and when they are empty, I fill them again, and lovely data rates.
All is well UNTIL I want to stop the stream, and read something else. The
2*64 bytes gets prefixed to the next thing I read.Reading the data does not work as the CPU driving the MAX3421E obligingly fills the FIFO's up again.
What I want to do is:
a) Send vendor specific command to start stream operation
b) Read loads of data
c) Send vendor specific command to stop stream operation (stops filling EP2IN any more but there are 2*64 bytes up the spout)
c) Do something at the PC end to get rid of those bytes.
e) Send vendor specific command to start next operation
Is there anyway the MAX3421E can empty the EP2INFIFO's in step c?
What is the "right" way of doing step d? I have tried an assortment of flushing, aborting, and resetting EP2IN at the PC end of things.
TIA,
Bill