I Work on BF609 EZ-BOARD. BF609 is host mode. I want to read same data repeatedly, size of data is 2M.
My program is that use USB DMA Mode 1, reset DMA setup after system interrupt , interrupt is occurred by system receive the last packet. Data of reset DMA setup are as follows:
- DMA count is length of last packet
- DMA address is my specified location
- DMA control is EN, IE and Correspondence value of DMA channel .
System interrupt when DMA transfer complete.
System receive bulk transfer completely when I first read data. System receive data which lack last packet(CSW) when I read data again.
I check DMA setup and status,just like first reading.
I tested a few condition:
- Size of data is 256K. System still does not receive the last packet when I read data again.
- DMA count is 64 bytes when reset DMA setup,first 32 bytes of buffer is not changed,last 32 bytes of buffer is changed.
- Modify data of buffer manually before reset DMA setup,system can receive last packet by DMA.
Why can system not receive the last packet(CSW) of transfer when I read data again?