Question
STM32H7 SDMMC ACMD51
Hello,
I'm migrating the code from stm32f4 to stm32h7 and stuck with SDMMC ACMD51 command. This command reads SD configuration register via data lines (8 bytes total).
Is there is any way to configure this request to set DBCKCEND flag when it receives all bytes? Or FIFO flags polling only the way?
Here is my attempt to do it:
#define SDIO SDMMC1
#define SD_ACMD51 51|SDMMC_RESPONSE_SHORT|SDMMC_WAIT_NO|SDMMC_CPSM_ENABLE|SDMMC_CMDTRANS
SDIO->DTIMER = 0xFFFFFF;
SDIO->DLEN = 8;
SDIO->DCTRL = SDMMC_DCTRL_RWSTART|(3<<SDMMC_DCTRL_DBLOCKSIZE_Pos)|SDMMC_DCTRL_DTDIR;
result= sdio_send_acmd_blocking(SD_ACMD51, 0);
if(result!=0) return result;
result = wait_for_sd_data_ready(); //waiting for DBCKCEND interrupt
