RT1052 USDHC Auto CMD12 error not belong to Command Error

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

RT1052 USDHC Auto CMD12 error not belong to Command Error

877 Views
dasg
Contributor I

Dear developers:

I encountered an AC12E problem when using usdhc2. I use  USDHC_TransferBlocking() to write/read SD card, It's work fine most of the time.

However, sometimes it gets stuck at USDHC_WaitCommandDone(), it is wait command complete or USDHC encounters error, never quit while() loop. The interruptStatus is 0x1008000, AC12E bit is set, but kUSDHC_AutoCommand12ErrorFlag not belong to kUSDHC_CommandErrorFlag, so it is stuch there.

how to solve this problem?

0 Kudos
3 Replies

850 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Thank you for the patience.

I could check the kUSDHC_AutoCommand12ErrorFlag was belongs to kUSDHC_DataErrorFlag.

Could you help to provide more detaild info about your test environments?

  1. SD Card info (part number, size, type...);
  2. SDK software version info;
  3. Test code or related SDK demo info;
  4. How to regenerate this issue (reference demo code);

Then I will check if we could regenerate this issue with MIMXRT1050-EVKB board.

Thank you for the help!

Mike

 

0 Kudos

832 Views
dasg
Contributor I

Hi,

Thank you for the reply.

1、sd card is SanDisk SDHC 4GB

2、SDK version is 2.3.1

3、driver code use rtthread port code, see it in https://gitee.com/rtthread/rt-thread/blob/gitee_master/bsp/imxrt/libraries/drivers/drv_sdio.c

4、use posix write/read。Pull out the sd card during the writing process, there is a small chance that it can be reproduced

0 Kudos

826 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

MCUXpresso SDK for RT1050 also provide SD card driver and exmpale demo.

Please check sdcard_interrupt or sdcard_polling demo with SDK package.(path: .\boards\evkbimxrt1050\sdmmc_examples)

The latest SDK version is V2.11.1.

Wish it helps.

Mike

0 Kudos