You said:
> but I lose some packets if my Dtd buffer isn't aligned on 1024 Bytes.
I advised how to align buffers.
I also asked you:
> it would help if you said exactly what buffer you are using. is it one of these?
You haven't said WHICH buffer needs aligning in the code, so that makes it hard to help you.
You then said:
> But my problem is not to align my buffer,
So what is the problem? From what you say, you only lose data if the buffers aren't aligned. So align the buffers and the problem is solved.
> But I don't understand Why I would like receive 64 packets of 64 bytes the end of some packet are lost.
I don't understand why you want to like to lose packets either.
> I don't know if my explain it is more clear.
Very unclear. Can you get someone else to check and edit your question before posting next time?
> I have this problem when my buffer address is 0x40FEFF00 all data received after 0x40FEFFFF are not in my SDRAM.
So DON'T use that buffer address!
It is common practice with cheaply designed DMA hardware like the MCF5329 has in the USB and LCD controller, that they don't use 32-bit adders to calculate the addresses. For instance, in the LCD controller (this bit me yesterday) that the entire DMA buffer must fit within a 4M memory page. This is because the hardware only increments the bottom 22 bits of the DMA address, so Address Bit A21 doesn't carry into A22. This means the address after 0x003fffff is 0x00000000 (and 0x413fffff is 0x41000000 and so on).
If this buffer is "4k aligned" then "x40FEFFFF + 1 = 0x40FEF000" and not 0x40FF0000. Look in memory at 0x40FEF000 and see if that is where it has copied your data.
If you search for the word "align" in the Reference Manual there are 6 matches in the USB chapters. The code we bought allocates all USB DMA memory from a 4k aligned block. The comment on this says "This address must be 4KB aligned because the periodic list uses it".
If you read the EHCI Specification it says "The frame list must always be aligned on a 4K page boundary. This requirement ensures that the frame list is always physically contiguous.". That spec might answer your question.