• AVR Freaks

SDHC ?

Page: 12 > Showing page 1 of 2
Author
prinz3nroll3
Super Member
  • Total Posts : 270
  • Reward points : 0
  • Joined: 2007/03/14 09:38:25
  • Location: germany
  • Status: offline
2009/06/16 22:42:27 (permalink)
0

SDHC ?

Hello,
is it possible to use sdhc 4GB Card with the MDD Library v1.2.2?
If it is not possible what are the necessary changes to use  sdhc cards?

thx
#1

22 Replies Related Threads

    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: SDHC ? 2009/06/17 04:47:00 (permalink)
    0
    It does not have SDHC support as-is. A slight modification to the initialization routine and then the address sent to the card needs to be changed in several of the functions. You will need a flag to tell the code what type of card it is dealing with.
    #2
    bosco
    Super Member
    • Total Posts : 2119
    • Reward points : 0
    • Joined: 2004/07/24 10:17:53
    • Location: Idaho
    • Status: offline
    RE: SDHC ? 2009/06/17 07:03:20 (permalink)
    1 (1)
    Any card > 2G will have a default block size of 1024 not 512.
    #3
    prinz3nroll3
    Super Member
    • Total Posts : 270
    • Reward points : 0
    • Joined: 2007/03/14 09:38:25
    • Location: germany
    • Status: offline
    RE: SDHC ? 2009/06/17 08:17:57 (permalink)
    0
    hi,
    have somebody finish the implementation of sdhc?
    thx
    #4
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: SDHC ? 2009/06/17 09:01:10 (permalink)
    0
    I'm not sure what chip you are using, but check out FATfs for PIC32.  It has SDHC support built-in.  You can use this as a start to modify the MDD file system if you prefer.
    #5
    prinz3nroll3
    Super Member
    • Total Posts : 270
    • Reward points : 0
    • Joined: 2007/03/14 09:38:25
    • Location: germany
    • Status: offline
    RE: SDHC ? 2009/06/18 03:11:07 (permalink)
    0
    Hello,
    pic18f67j10 ;)
    #6
    eddygo
    Super Member
    • Total Posts : 691
    • Reward points : 0
    • Joined: 2004/03/04 15:45:37
    • Location: Bucharest, ROMANIA
    • Status: offline
    RE: SDHC ? 2009/06/18 04:55:22 (permalink)
    0
    have somebody finish the implementation of sdhc?

     
    Do'it yourself. Modify init to accept CMD8 before ACMD41, make HCS bit HI in arg of ACMD41 and that's all.
    And for addressing scheme, make a 'correction address' function which basically follow the rule
     
    SD = SDHC / block_len or viceversa SDHC*block_len = SD
     
    since even SD addressing is "linear" is irrelevant, you cannot write missalign blocks (aka crossing logical blocks). 
    So any FAT sys will use blocks.

    ENEA, OSECK
    http://www.enea.com
    #7
    minhthe2305
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2009/04/12 23:22:46
    • Location: 0
    • Status: offline
    RE: SDHC ? 2009/06/25 21:43:41 (permalink)
    0
    Hi,
     
    Do you know what is the crc value for ACMD41?
     
    Regards,
     
    MThe
    #8
    eddygo
    Super Member
    • Total Posts : 691
    • Reward points : 0
    • Joined: 2004/03/04 15:45:37
    • Location: Bucharest, ROMANIA
    • Status: offline
    RE: SDHC ? 2009/06/26 01:15:41 (permalink)
    0
    You don't need CRC for ACMD41, you already are in SPI mode with CRC disabled after CMD0. So use 0xFF as CRC from now on. Exception is CMD8 which needs CRC, you'll need for proper SDHC init.

    ENEA, OSECK
    http://www.enea.com
    #9
    minhthe2305
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2009/04/12 23:22:46
    • Location: 0
    • Status: offline
    RE: SDHC ? 2009/06/26 01:19:13 (permalink)
    0
    Thank for your reply.

    I am using SD mode. But now I have another question.

    What is the crc value for CMD2, How can we send CMD2 to sd card?

    Regards,

    MThe.
    #10
    eddygo
    Super Member
    • Total Posts : 691
    • Reward points : 0
    • Joined: 2004/03/04 15:45:37
    • Location: Bucharest, ROMANIA
    • Status: offline
    RE: SDHC ? 2009/06/26 02:09:15 (permalink)
    0
    See SD specs, but as far as I remember you never need CMD2. All you need for init is CMD0 (CMD8 for SDHC) then ACMD41. I don't know exact CRCs since I calculate them runtime. If you provide manually, ask google for CRC-7 (CRC-8) on-line calculator and you may verify with CMD0 & args 0 -> CRC-7 = 0x95. 

    ENEA, OSECK
    http://www.enea.com
    #11
    minhthe2305
    New Member
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2009/04/12 23:22:46
    • Location: 0
    • Status: offline
    RE: SDHC ? 2009/06/28 18:59:41 (permalink)
    0
    Hi, thank for your reply,
     
    In SD mode, when we continuosly send the ACMD41 command in the power up routine, that means we have to send CMD55+CMD41 continuosly.
     
    Is that correct?
     
    Regards,
     
    MThe.
    #12
    eddygo
    Super Member
    • Total Posts : 691
    • Reward points : 0
    • Joined: 2004/03/04 15:45:37
    • Location: Bucharest, ROMANIA
    • Status: offline
    RE: SDHC ? 2009/07/14 00:24:23 (permalink)
    0
    Yes, this is correct. Except when sending CMD41, make HCS bit=1 in argument to proper init SDHC also (won't hurt SD). Also remember before ACMD41 must send CMD8 (only for SDHC, again, won't hurts SD at all). So you'll have a compatible SD/SDHC routine. Stay in large loop until either at CMD55 or CMD41 reply will be 0x00 (think ACMD41 as two separate commands as in fact they really are, but must be consecutive).
     
    Cheers,

    ENEA, OSECK
    http://www.enea.com
    #13
    MariusVoicu
    New Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2008/10/31 05:41:20
    • Location: 0
    • Status: offline
    RE: SDHC ? 2009/11/10 07:58:14 (permalink)
    0
    MDD Library v1.2.3 has the SDHC support added...
    #14
    masscard
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2010/01/12 03:00:03
    • Location: 0
    • Status: offline
    RE: SDHC ? 2010/01/12 03:05:28 (permalink)
    0
    Where i can find the MDD library v1.2.3. Could you please put the link? I have found only the version 1.2.2 that not supply SDHC.
    Thanks,
    Massimo
    #15
    prinz3nroll3
    Super Member
    • Total Posts : 270
    • Reward points : 0
    • Joined: 2007/03/14 09:38:25
    • Location: germany
    • Status: offline
    RE: SDHC ? 2010/01/13 01:05:16 (permalink)
    #16
    RISC
    Super Member
    • Total Posts : 5376
    • Reward points : 0
    • Status: offline
    RE: SDHC ? 2010/02/14 04:22:52 (permalink)
    0
    Hi,

    Has anybody implemented long filename support on the MDD libraries ?

    Thanks
    post edited by RISC - 2010/02/14 04:29:54
    #17
    crevasses
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2012/01/19 03:05:54
    • Location: 0
    • Status: offline
    RE: SDHC ? 2012/01/19 03:12:57 (permalink)
    0
      hey is there particular response i should expect after sending CMD41 for HCSD??? and should i send (1UL << 30) or (OCR_INDEX | 1UL << 30) ORC_INDEX BEING 0x00FF8000... help needed.....
    #18
    sumith
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2012/08/26 23:04:49
    • Location: 0
    • Status: offline
    RE: SDHC ? 2013/01/12 00:04:09 (permalink)
    0
    Hi,
        I have a problem with Microchip MDD File system v1.4.2 . I am using pic24fj128ga010 IC with Transcend sdhc 4 GB card.
     1. Card fails to initialize,it is not responding to cmd0. The response code is always 0xff;
     2. SPI works fine. Still have the same problem.
    3. The supply given to SDHC card is 3.3v
    Could anyone tell me where the problem lies?

    Thanks in advance.
    post edited by sumith - 2013/01/12 00:05:58
    #19
    sasa72
    Super Member
    • Total Posts : 418
    • Reward points : 0
    • Joined: 2011/08/09 05:17:18
    • Location: 0
    • Status: offline
    RE: SDHC ? 2013/01/12 13:54:34 (permalink)
    5 (1)
    Do you have pull-ups and bypass caps? Some cards would not work correctly without.
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2019 APG vNext Commercial Version 4.5