prinz3nroll3
Super Member
- Total Posts : 270
- Reward points : 0
- Joined: 2007/03/14 09:38:25
- Location: germany
- Status: offline
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
|
jmag99
Super Member
- Total Posts : 486
- Reward points : 0
- Joined: 2007/09/21 08:04:33
- Location: RI, United States
- Status: offline
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.
|
bosco
Super Member
- Total Posts : 2119
- Reward points : 0
- Joined: 2004/07/24 10:17:53
- Location: Idaho
- Status: offline
Any card > 2G will have a default block size of 1024 not 512.
|
prinz3nroll3
Super Member
- Total Posts : 270
- Reward points : 0
- Joined: 2007/03/14 09:38:25
- Location: germany
- Status: offline
hi, have somebody finish the implementation of sdhc? thx
|
jmag99
Super Member
- Total Posts : 486
- Reward points : 0
- Joined: 2007/09/21 08:04:33
- Location: RI, United States
- Status: offline
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.
|
prinz3nroll3
Super Member
- Total Posts : 270
- Reward points : 0
- Joined: 2007/03/14 09:38:25
- Location: germany
- Status: offline
|
eddygo
Super Member
- Total Posts : 692
- Reward points : 0
- Joined: 2004/03/04 15:45:37
- Location: Bucharest, ROMANIA
- Status: offline
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.
|
minhthe2305
New Member
- Total Posts : 29
- Reward points : 0
- Joined: 2009/04/12 23:22:46
- Location: 0
- Status: offline
Hi, Do you know what is the crc value for ACMD41? Regards, MThe
|
eddygo
Super Member
- Total Posts : 692
- Reward points : 0
- Joined: 2004/03/04 15:45:37
- Location: Bucharest, ROMANIA
- Status: offline
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.
|
minhthe2305
New Member
- Total Posts : 29
- Reward points : 0
- Joined: 2009/04/12 23:22:46
- Location: 0
- Status: offline
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.
|
eddygo
Super Member
- Total Posts : 692
- Reward points : 0
- Joined: 2004/03/04 15:45:37
- Location: Bucharest, ROMANIA
- Status: offline
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.
|
minhthe2305
New Member
- Total Posts : 29
- Reward points : 0
- Joined: 2009/04/12 23:22:46
- Location: 0
- Status: offline
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.
|
eddygo
Super Member
- Total Posts : 692
- Reward points : 0
- Joined: 2004/03/04 15:45:37
- Location: Bucharest, ROMANIA
- Status: offline
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,
|
MariusVoicu
New Member
- Total Posts : 24
- Reward points : 0
- Joined: 2008/10/31 05:41:20
- Location: 0
- Status: offline
MDD Library v1.2.3 has the SDHC support added...
|
masscard
New Member
- Total Posts : 4
- Reward points : 0
- Joined: 2010/01/12 03:00:03
- Location: 0
- Status: offline
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
|
prinz3nroll3
Super Member
- Total Posts : 270
- Reward points : 0
- Joined: 2007/03/14 09:38:25
- Location: germany
- Status: offline
|
RISC
Super Member
- Total Posts : 5994
- Reward points : 0
- Status: offline
Hi, Has anybody implemented long filename support on the MDD libraries ? Thanks
post edited by RISC - 2010/02/14 04:29:54
|
crevasses
New Member
- Total Posts : 1
- Reward points : 0
- Joined: 2012/01/19 03:05:54
- Location: 0
- Status: offline
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.....
|
sumith
New Member
- Total Posts : 7
- Reward points : 0
- Joined: 2012/08/26 23:04:49
- Location: 0
- Status: offline
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
|
sasa72
Super Member
- Total Posts : 418
- Reward points : 0
- Joined: 2011/08/09 05:17:18
- Location: 0
- Status: offline
Do you have pull-ups and bypass caps? Some cards would not work correctly without.
|