Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB low-full-high speed peripherals Forum Discussions

Anonymous
Not applicable

Hello,all.

   

i got a trouble that how to clear the uncommitted content in one endpoint fifo.

for example
i miswrite some data(unknown how much but less than 512) in the salve fifo of endpoint 2.the packet size of endpoint 2 is 512B
then i want to clear the data.
i tried to use "FIFORESET=0x02" or "FIFOREST=0x82",which means reset the endpoint 2.
but it failed. that method can't clear the data. because next time i read the endpoint 2, the data miswritted in are still there.

   

so what can i do to clear them

   

Thank you
Regards

0 Likes
2 Replies
Anonymous
Not applicable

Hi achy,

   

Please use

   

OUTPKTEND = 0x82;

   

SYNCDELAY;

   

Repeat the same thing as many times as your buffer depth. Have 2 sets of above mentioned statements if the EP2 is double buffer.

   

FIFORESET just reset the FIFO pointers...

   

Thanks,

   

sai krishna.

0 Likes
Anonymous
Not applicable

Thank you

   

I will try the INPKTEND tomorrow

0 Likes