LPC4330 SDIF DMA Starting additional data write transfers on open ended multi-block writes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4330 SDIF DMA Starting additional data write transfers on open ended multi-block writes

Jump to solution
601 Views
nsmith17044
Contributor II

I'm attempting to perform an open ended multi-block write operation to a SD memory card.  Once the first multi-block transfer is finished (not sending auto_stop at the end), the next DMA is setup with  Chip_SDIF_SetByteCnt() and Chip_SDIF_DmaSetup().

Once the card is no longer busy, how do I initiate that DMA data transfer withing issuing a command on the CMD line?  I've been through the registers a few times and can't seem to see how to do this.  Or is there a SD command that would be safe to send that would allow proper data write transfer to continue while the card is in multi-block write mode and start the DMA transfer that has been setup? 

Labels (3)
0 Kudos
1 Solution
473 Views
nsmith17044
Contributor II

PROBLEM SOLVED:

As I watched more carefully I noticed that there was no command response after the SEND STATUS.  I realized that I wasn't supplying a proper argument for SEND STATUS and therefore the card wasn't responding with a response.  After correcting this oversight, the command response was returned and I saw the DMA start as expected. 

Evidently the SDIF needs to see a proper command response (even it it is not expected) for the SDIF DMA to start.

View solution in original post

0 Kudos
2 Replies
474 Views
nsmith17044
Contributor II

PROBLEM SOLVED:

As I watched more carefully I noticed that there was no command response after the SEND STATUS.  I realized that I wasn't supplying a proper argument for SEND STATUS and therefore the card wasn't responding with a response.  After correcting this oversight, the command response was returned and I saw the DMA start as expected. 

Evidently the SDIF needs to see a proper command response (even it it is not expected) for the SDIF DMA to start.

0 Kudos
473 Views
nsmith17044
Contributor II

One of the solutions I tried was to send a 'send status' command with the MCI_CMD_DAT_WR and MCI_CMD_DAT_EXP bits set in the command register.  I had hoped that this will start the DMA transfer.  This does issue the command on the CMD bus line but still does NOT start the DMA transfer of data.

 I had hoped that simply setting the MCI_CMD_DAT_WR and MCI_CMD_DAT_EXP bits would trick the SDIF DMA into starting the initialized descriptor.

The FIFO is cleared and the DMA initialized with:

    // setup the SDIF DMA to write the data
    Chip_SDIF_SetClearIntFifo(pSDMMC);
    Chip_SDIF_SetByteCnt(pSDMMC, cbWrote);
    Chip_SDIF_DmaSetup(pSDMMC, &g_card_info->sdif_dev, (uint32_t) buffer, cbWrote);

    Chip_SDIF_ClrIntStatus( LPC_SDMMC , 0xFFFFFFFF);

Can anyone tell me how to continue to write data via the SDIF DMA?  Or a way to perform the 'continued' open-ended multiblock write process?

0 Kudos