AnsweredAssumed Answered

SDIO Wide Bus Enable Issue

Question asked by Tabulous on Apr 11, 2012
Latest reply on Sep 3, 2012 by kraft.tobias
In my diskio.c wrapper for fatfs file system i have now got the problem of not been able to enable 4bit wide bus on SDIO. Below is the functions i call in disk_initailse().

errorstatus = SD_Init();
errorstatus = SD_GetCardInfo( &SDCardInfo );
errorstatus = SD_SelectDeselect( (uint32_t)(SDCardInfo.RCA << 16 ));
errorstatus = SD_EnableWideBusOperation( SDIO_BusWide_4b );

If i just run this my code will loop here in FindSCR forever more.

        if ( SDIO_GetFlagStatus( SDIO_FLAG_RXDAVL ) != RESET )
            *( tempscr + index ) = SDIO_ReadData();

If however i place a break point on SD_Init(), and then single step over the functions one by one, volia !! it works fine, so going slow is the option, i suspect there is some more dodgy code somewhere in the st lib.

Anyone care to comment on this please as this SDIO interface is be coming a pain in the *ss.