hi:
I find two bug SDK_2_12_0_MIMXRT1052xxxxB/middleware/sdmmc/sd/fsl_sd.c,
bug1:
SD_ReadBlocks and SD_WriteBlocks, determine if the cache is aligned,code is
((uint32_t)nextBuffer) & (sizeof(uint32_t) - 1U), it should be
((uint32_t)nextBuffer) & (SDMMC_DATA_BUFFER_ALIGN_CACHE - 1U).
Just because the data used in the example is stored in dtcm, the problem is not exposed. If ocram or sdram is used, there may be problems with the transmission of the sd card.
bug2:
SD_PollingCardStatusBusy(). When the sd card continues to read files, it will be stuck when the card is pulled out.
Because cardBusy is always false, and SD_SendCardStatus() return kStatus_USDHC_SendCommandFailed, so it stuck.
Please check and fix it. Thanks.