cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO + DMA -> FEIF error

brubinstein
Associate II
Posted on April 29, 2015 at 17:05

I didn't find way to avoid this error but ignoring it. I wasn't the first one of doing so. There is an example from Keil: .\Keil\ARM\Boards\Keil\MCBSTM32F400\RL\FlashFS\SD_File\SDIO_STM32F4xx.c

[code]

static BOOL WriteBlock (U32 bl, U8 *buf, U32 cnt) {

  /* Write a cnt number of 512 byte blocks to Flash Card. */

  U32 i;

  SDIO->DLEN    = cnt * 512;

  SDIO->DTIMER  = cnt * DATA_WR_TOUT_VALUE;

  SDIO->DCTRL   = SDIO_DCTRL_DBLOCKSIZE_3 | SDIO_DCTRL_DBLOCKSIZE_0 |

                  SDIO_DCTRL_DMAEN        | SDIO_DCTRL_DTEN         ;

  for (i = DMA_TOUT; i; i--) {

    if (DMA2->LISR & DMA_LISR_TEIF3) {

      break;

    }

    

    if (DMA2->LISR & DMA_LISR_TCIF3) {

      if ((SDIO->STA & (SDIO_STA_DBCKEND|SDIO_STA_DATAEND)) == (SDIO_STA_DBCKEND|SDIO_STA_DATAEND)) { 

        /* Data transfer finished. */

        return (__TRUE);

      }

    }

  }

  /* DMA Transfer timeout. */

  return (__FALSE);

}

[/code]

If you look inside their for loop they just ignoring FEIF.

I verified that card access works (at least every time I've tried) and as I stated before I don't know any way to avoid this error. 

STM errata doesn't shed light on this issue or I didn't find it...

Does anyone know the better way to deal with this issue?

Thank you.

#stm32-sdio-dma-fifo-feif
0 REPLIES 0