Hello,
we have our vxWorks SD card driver using MMC1 host controller of the TI AM5716 CPU now running to operate with master DMA access, means we are using CMD17/CMD24 for read/write blocks of 512 Bytes from/to the SD card using the master DMA of the host controller and interrupts to get the end of DMA signaled. We still got bad access interrupts sporadically.
We have set using Lauterbach a read/write breakpoint on the data register of the host controller MMC1 (b.s 0x4809C220 /READWRITE /ONCHIP) to ensure that the CPU does not occasionally access the register when using DMA. The debugger does not break.
We also got bad access interrupts before where we have not used DMA but reading the data register from the CPU (where we also got too less data at the beginning of the block, 4 or 8 Bytes (1 or 2 words) too less).
We wait in the driver after doing a block transfer for the end of DMA (interrupt status Bit 3 end of DMA 0x00000008) and after that for the end of data transfer (Bit 1 0x00000002), which could be set before or after the DMA complete bit in our code.
We have no overlapping commands or accesses (only one task which does the access to the SD card block after block).
Do you know any reason or cause why we could get a bad access interrupt signaled (and may be also corrupt data)?
Thank you,
Best regards,
Christian Fisahn