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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,368 次查看
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? 

标签 (3)
0 项奖励
回复
1 解答
1,240 次查看
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 项奖励
回复
2 回复数
1,241 次查看
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 项奖励
回复
1,240 次查看
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 项奖励
回复