Hi, As the host is sending one complete packet (i.e.1024 for SS), the device does not know that the transfer from the host has ended. If the host send data less than packet size, then the device automatically knows that the transfer has ended, (as it is less than one packet). This is how USB works.
So, to meet your requirements, you can try one of the following:
a) Send a ZLP from the host after the 1024 transfer.
b) make the DMA buffer size to be 1024 (i.e. equal to the DMA buffer size).
Sending a ZLP after 1024 bytes works for me.
Thank you, Aditya.