Im trying to implement sd card reader on lpc1768. I completed that with the slave mode operation.Now i m stucked with DMA mode.After i entered into write command i didnt receive interrupt.There are two interrupts in dma mode EOT,NDD. Those should always come in the loop right??? after receiveing first NDD interrupt i will receive EOT.This will be in continues format.But i m not receiving them like dis.Sometimes i receive two EOT the sequence follows.This same thing happened with NDD as well.When i entered into write_10 SCSI command i should receive inetrrupt but i m not receiving that.I m bit confused in dma mode. I m using NXPUSBLIB 0.98b for thje reference. void Endpoint_Streaming(uint8_t corenum, uint8_t *buffer, uint16_t packetsize, uint16_t totalpackets, uint16_t dummypackets) { uint8_t PhyEP = endpointhandle(corenum)[endpointselected[corenum]]; uint16_t i; dummypackets = dummypackets; if (PhyEP & 1) { for (i = 0; i < totalpackets; i++) { while (!Endpoint_IsReadWriteAllowed(corenum)) ; Endpoint_Write_Stream_LE(corenum, (void *) (buffer + i * packetsize), packetsize, NULL); Endpoint_ClearIN(corenum); } } else { for (i = 0; i < totalpackets; i++) { DcdDataTransfer(PhyEP, usb_data_buffer_OUT[corenum], packetsize); Endpoint_ClearOUT(corenum); while (!Endpoint_IsReadWriteAllowed(corenum)) ; Endpoint_Read_Stream_LE(corenum, (void *) (buffer + i * packetsize), packetsize, NULL); } } } In above function why do we have to again DcdDataTransfer(PhyEP, usb_data_buffer_OUT[corenum], packetsize); in the Write_10 command?
Hello Neha
Did you play around with the already exisiting example "File Demo" for this device from "Pack installer" ?
It gives user the flexibility to utilize DMA as well.
Thank you so much Sankalp for reply. I didnt check with the demo code. As i have to write it for many controllers so i want them all to be alike. Dats y i prefer nxplib.
Are you talking about code bundle???? Will you plz send me a link.
I m trying to analyze issue.One thing i found is when device receive Write _10 request it is not getting interrupt.