2014-07-21 01:08 AM
I am working with an STM32 eval2 board and trying to debug it. It used to work fine, and I haven´t changed anything, but for the last week or so I am always getting stuck in this loop while I am in debugger mode, but when I am not, the program runs fine.
while(!__HAL_SD_SDIO_GET_FLAG(hsd, SDIO_FLAG_RXOVERR | SDIO_FLAG_DCRCFAIL | SDIO_FLAG_DTIMEOUT | SDIO_FLAG_DBCKEND | SDIO_FLAG_STBITERR)) { if(__HAL_SD_SDIO_GET_FLAG(hsd, SDIO_FLAG_RXDAVL)) { *(tempscr + index) = SDIO_ReadFIFO(hsd->Instance); index++; } }
I even tried running the sample project code provided for the board by ST, did not change anything about it, and I am stuck in the same while loop in their code as well.
Does anybody know what I am doing wrong here? It doesn´t make sense because nothing changed.
The errors that are defined by the variables in the while loop are (respectively):
Received FIFO overrun error
Data block sent/received (CRC check failed) Data timeout Data block sent/received (CRC check passed) Start bit not detected on all data signals in wide bus modeand it looks like in this while loop it is getting stuck in the if statement for a ''Data available in receive FIFO'' flag, if that makes sense. I cannot step over that if statement.
I am using keil v5 and programming in c++
#eval #keil #stm32f4 #c++2014-07-21 01:11 AM
Like I said I have had this problem for a week and immediately after I posted this I figured it out. I had the SD card in, and for some reason that was giving me those errors. I will leave this post in case anyone else ever has this problem.