RT1052 SDK2.12.0 middleware sdmmc bugs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1052 SDK2.12.0 middleware sdmmc bugs

554 Views
dasg
Contributor I

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.

0 Kudos
3 Replies

541 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @dasg ,

1. But there is no word say the buffer must be 32 byte align in reference manual. Can you give an example?

2. Yes, SD_SendCardStatus() or low level function should prevent kStatus_USDHC_SendCommandFailed return to high level function. I'll report the software team your suggestion.

 

Regards,

Jing

0 Kudos

398 Views
aero
Contributor I

 SD Card driver for MCUXpresso SDK
The current driver version is 2.4.0. did not fixSD_PollingCardStatusBusy yet .

0 Kudos

539 Views
dasg
Contributor I

Hi @jingpan 

1. Because the Dcache,so buffer need  32 bytes align. You can try change buffer from DTCM to OCRAM, then, read a long file(example 1MB) from tail to begin, the data read is misplaced;Maybe mount and then open will make an error, no need to read。

0 Kudos