This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Failed to use sdhc card boot (4G)

Our DM365 EVM boots up to the "sdcard_init", any suggestions as to what could be wrong?

=================

SD card boot and flashing tool for DM355 and DM365
by Constantine Shulyupin http://www.LinuxDriver.co.il/
Online manual: http://wiki.davincidsp.com/index.php/SD_card_boot_and_flashing_tool_for_DM355_and_DM365
based on TI DM35x FlashAndBootUtils 1.10 SFT, TI flash_utils and SpectrumDigital evmdm355, evmdm365
Compiled on Jan  1 1970 at 00:12:35 with gcc 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)
SYSTEM->DEVICE_ID=0x0B83E02F
&EMIFStart=0x02000000
nand->devID=0x000000D3 nand->dataBytesPerPage=2048 nand->pagesPerBlock=64 nand->numBlocks=8192 nand_size=1073741824
sdcard_init

==============

 

I must use sdhc sd card not 2G sd card.

Could you give me some ways to slove it?

  • Weidong,

     

    Again, you are using a community created tool.  We do not have personal knowledge of this tool.  However, the person that created this is Constantine Shulyupin and his contact details are listed below.  Constantine, I hope you are watching this post.  Would you be able to respond? 

    Constantine Shulyupin http://www.LinuxDriver.co.il/

  • I got it to work with a 2GB Kingston SD card, unfortunately I don't have a 4GB SDHC card handy to try out but I should have one tomorrow which I will give a try. I am not sure if the utility was meant to work with SDHC cards, if it does not work for me than that may be the case, as Jeff suggests you may need to ask Constantine.

  • To follow up on this, I tried a 4GB SDHC card myself, a HP L1878A, marked with SD-K04G on the back, and I got the same results, the board starts coming up so the boot process at the ROM boot loader level was actually successful, but the re-flashing utility on the SD card hangs as sdcard_init. This being said I suspect that SDHC support is simply not in there, which makes some sense the more I think about it since SDHC support is not present in the current Monta Vista based DVSDK code that I believe Constantine's utility is based on (at least not without some special patching). If you wanted to really dig into this you could take Constantine's sources and the SDHC patches, and integrate them together, though i am not sure how big of an effort that would end up being.

    If you want to get in touch with Constantine, it looks like he is still active in the forum on this thread, SDHC was mentioned there too but was simply not tested.

  • I only have used a SanDisk 2GB SD Card to boot the DM365 EVM, and once tried a Kingston 8GB SDHC Card, but failed, it seems that SDHC is not supported right now.

  • It works well for me now.

    You should send CMD8 to SDCard in SDcard initialization.

     

  • Really? I'd like to have a try.

  • Weidong,

    "Send CMD8 to SDCard in SDcard initialization"

    Please can You be more specific. What file & lines in Constantine's source should be changed?

    Or supply the patch if it works.

  • The patch file is attached.

    diff --git a/sdcard_flash/DM36x/mmcsd_evm.c b/sdcard_flash/DM36x/mmcsd_evm.c

    --- a/sdcard_flash/DM36x/mmcsd_evm.c

    +++ b/sdcard_flash/DM36x/mmcsd_evm.c

    @@ -120,7 +120,8 @@

         localCSDInfo->readBlkPartial    = ( cardCSD[4] >> 15 ) & 1;

         localCSDInfo->readBlkLenBytes   = 1 << ( cardCSD[5] & 0xF );

         // These bits are reserved in the case of SD card

    -    localCSDInfo->sysSpecVersion    = ( cardCSD[7] >> 10 ) & 0xF;

    +    localCSDInfo->sysSpecVersion    = ( cardCSD[7] >> 12 ) & 0xF;

    +    

         return 0;

     }

     

    diff --git a/sdcard_flash/DM36x/mmcsd_protocol.c b/sdcard_flash/DM36x/mmcsd_protocol.c

    --- a/sdcard_flash/DM36x/mmcsd_protocol.c

    +++ b/sdcard_flash/DM36x/mmcsd_protocol.c

    @@ -168,6 +168,9 @@

             if ( mmcsdCSDRegInfo.readBlkMisalign != 1 )

                 return E_INVALID_INPUT;

     

    +    if(mmcsdCSDRegInfo.sysSpecVersion)

    +        cardMemAddr = cardMemAddr >> 9;

    +        

         if ( MMCSD_sendCmd( MMCSD_SET_BLOCKLEN, blklength, 0, MMCSD_STAT0_RSPDNE ) )

             return E_FAIL;

     

    @@ -341,7 +344,9 @@

         Uint16 status;

         Uint16 cardReg[8];

         Uint8 mmc = 1;

    -

    +    int voltage_range = 0x00ff8000;

    +    

    +    FNSTART

         /* Place all cards in idle state */

         if ( status = MMCSD_goIdleState( ) )

             return status;

    @@ -351,6 +356,11 @@

     

         /* Introduce a delay for slow cards */

         EVMDM365_waitusec( 100000 );

    +    

    +    if(MMCSD_sendCmd(8|MMCSD_RSP1, 0x1AA, 1, MMCSD_STAT0_RSPDNE) == 0) {

    +            print_hex(MMCSD_MMCRSP01);

    +            voltage_range |= (1<<30);

    +    }

     

         status = MMCSD_appCmd( 0 );     /* Send CMD55 with RCA = 0 */

     

    @@ -359,7 +369,7 @@

         else

         {

             // Experimenting with the whole supported voltage range

    -        if ( SD_sendOpCond( 0x00ff8000, opTimeout ) )

    +        if ( SD_sendOpCond( voltage_range, opTimeout ) )

                 goto RESEND_CMD41;

             mmc = 0;

         }

  • Weidong,

    I follow you modify the code,2G Sandisk SD could boot,4G Kingston SDHC couldn"t.Complete copy of the data and stopped.Can you give me some advice?

    Regards,

  • Any update on SD-HC boot testing on DM365?

    Regards,

    Kartik Gandhi