Hi there,
I'm trying to set up an USB device with system DMA. On transmit side everything working well. On receive side the DMA itself is working, so I could see that the right amount of data with the right values are transferred from USB to the RAM. However in the Receive FIFO Status Register (RXFSTAT) the length is 0. So it says that no bytes are received.
My first thought was that this register could not be used to check how much data are received in case of DMA transfer, so I wanted to use the DMA channel related working control packet to get the current address of the last transfer. However at the 0xFFF80800 address the data is not the one I expect.
What I do is to set up a DMA channel 0 to transfer from USB DMA_DATA register to a RAM location with element size 8 bit, element count 1, frame count 64. USB is set up to receive 1 transaction in the RX_DMAx register. When 1 byte is sent on USB the EOT transfer interrupt is correctly received. I see in the DMA Port B Active Channel Destination Address Register a destination address of the initial address + 1, but I could not see anything in the DMA working control packet registers. Obviously I could not use the Port B Active Channel Destination Address Register, because in the meantime a different DMA transfer could be executed, that's why I wanted to use the DMA channel related working control packet. But it seems to me, that those area is not updated at all.
In this one byte example the DMA transfer is not finished yet, because there will be 63 frame left, but the same happens if I send 64 bytes on the USB in one packet and the DMA transfer itself finished.
Could you please suggest a solution how to read out the amount of received data from USB in case of DMA?
Thanks in advance!
Peter