[PIC] sdhc initialization (cmd 41 error)

Status
Not open for further replies.

anjalimidhuna

Member level 3
Joined
Jan 4, 2014
Messages
62
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Location
india
Visit site
Activity points
358
sdhc initializtaion(cmd 41 error)

hi,
i m facing a trouble while initializing sdhc 4gb card.
successfully responded till cmd41.i got responds as 0xff for this particular command .

i send
CMD0 -- res:0x01
CMD8 -- res:0x01AA
CMD55 res:0x01
CMD41 res:0xFF
 

Re: sdhc initializtaion(cmd 41 error)

SPI lines have pullups ? What Compiler are you using and what microcontroller ?
 

Re: sdhc initializtaion(cmd 41 error)

no pull ups in spi lines.. i m using pic18f4550 with hitech-c compiler for pic18
 

Re: sdhc initializtaion(cmd 41 error)

Pull ups needed. Zip and post full MPLAB project files. If pins used for SPI has ADC functions then you have to configure ANSELx or ADCONx registers and make those pins digital IO pins.
 

Re: sdhc initializtaion(cmd 41 error)

please find the attachment.

- - - Updated - - -

recently i found
An SDIO aware host sends CMD5 prior to the CMD55/ACMD41 pair, and thus would receive a valid OCR in
the R4 response to CMD5 and continue to initialize the card
from one pdf available in the Google .i tried this waiting for a non zero value and got the correct response but still CMD41 respond with 0xFF. it find strange !!
 

Attachments

  • sdhc_test.zip
    175.8 KB · Views: 97

Re: sdhc initializtaion(cmd 41 error)

actually i experimented all these specifications.but no use. pull ups in spi line didn't find use.
my card includes SD spec 3.0. as per the reference
 

Re: sdhc initializtaion(cmd 41 error)

It is not necessary to use pull-up's on all SPI lines. But you need to have a pull-up on chipselect (if it is active low) to maintain in high. Even if you permenantly enable the communication on SPI lines. Then drive chip select to 0 always so pull up will not be needed that time.
 
Reactions: Dont

    Dont

    Points: 2
    Helpful Answer Positive Rating
Re: sdhc initializtaion(cmd 41 error)

actually i experimented all these specifications.but no use. pull ups in spi line didn't find use.
my card includes SD spec 3.0. as per the reference

Pullup is necessary on the MISO line to prevent floating because the sd card puts in high impedance state this line when no communication is running. Other lines are usually set as outputs, so no pullups are required.
Do you put the SSEL line to high between the CMD55 and CMD41 ?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…