none
Problem writing to SD card on WEC7 platform RRS feed

  • Question

  • Hello,

    I am running a VS2008 application on a WEC7 platform with Adeneo ARM_A8_BSP for TI DM3730 processor.  From my app, I tried to copy a file from RAM to SD card using CopyFile() and the copy failed.  I also tried to open a new file for writing using fopen() and this function returns 0.  However, when I tried to open an existing file on the SD card for reading or copy a file from SD card to NAND, everything is fine.

    Can anyone tell me if it is possible to write to the SD card on this platform?  Is it a read-only device or I have some hardware problem?  I did try different SD card and got with same results.

    Thanks for your help -


    Luan Le

    Friday, June 21, 2013 6:46 AM

Answers

  • * Make sure your card is not write protected.

    * If you are using your custom hardware other than the Mistral EVM,then you have to check the GPIO number for the WriteProtect in your custom hardware and you have to program that GPIO number "CardWPGPIO" found in the SDHC.reg file.

    * Or you try ignoring the Write Protect checking in the SDHC by commenting out the "CardWPGPIO" registry key in the reg file.

    Regards,
    Prabu [eMVP]
    My Blog



    • Marked as answer by LuanLe Saturday, June 22, 2013 4:03 AM
    Friday, June 21, 2013 7:26 AM
  • In the SDHC reg file check if the following is enabled :

    "CardWPGPIO"=dword:7E             ; card R/W protection detection is done via GPIO_126
    "CardWriteProtectedState"=dword:1 ; logical 1 means the card is write protected

    Comment out this to disable right protect.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    • Marked as answer by LuanLe Saturday, June 22, 2013 4:03 AM
    Friday, June 21, 2013 11:54 PM

All replies

  • * Make sure your card is not write protected.

    * If you are using your custom hardware other than the Mistral EVM,then you have to check the GPIO number for the WriteProtect in your custom hardware and you have to program that GPIO number "CardWPGPIO" found in the SDHC.reg file.

    * Or you try ignoring the Write Protect checking in the SDHC by commenting out the "CardWPGPIO" registry key in the reg file.

    Regards,
    Prabu [eMVP]
    My Blog



    • Marked as answer by LuanLe Saturday, June 22, 2013 4:03 AM
    Friday, June 21, 2013 7:26 AM
  • In the SDHC reg file check if the following is enabled :

    "CardWPGPIO"=dword:7E             ; card R/W protection detection is done via GPIO_126
    "CardWriteProtectedState"=dword:1 ; logical 1 means the card is write protected

    Comment out this to disable right protect.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    • Marked as answer by LuanLe Saturday, June 22, 2013 4:03 AM
    Friday, June 21, 2013 11:54 PM
  • Hello Prabu and Misbah,

    I followed your instructions and SD card writing works now.

    Thank you very much -


    Luan Le

    Saturday, June 22, 2013 4:05 AM