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,393件の閲覧回数
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,265件の閲覧回数
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,266件の閲覧回数
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,265件の閲覧回数
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 件の賞賛
返信