SDIO+DMA FEIF error.I didn't find any 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
Код
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);
}
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 knows better way to deal with this issue?
Thank you in advance.
Сообщение отредактировал pitt - Apr 30 2015, 01:36