Read endpoint data using external logic | Cypress Semiconductor
Read endpoint data using external logic
I fill ep2 with 512 bytes with value of 05 using "cypress usb console" and "my own VS2008 program". it successfully writes data to ep2. following trm page 9-18 external logic(avr mega8535) checks flagc(empty) when is not asserted(high) it reads data and shows on LCD. after 512 reads empty flag will be asserted.
1- The read data are not 05 they are 65-165-218-138-201-49-174-30-173-27-146 ....(they are not random because with defferent tries results are the same)
2- because only 2 writes are successful i think this external reads will not empty the fifo
am I reading from wrong fifo OR an additional stage other than TRM page 9-18 should be done to empty fhe fifo?