2009-05-20 04:45:19     microSD problem...

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2009-05-20 04:45:19     microSD problem...

Nikolay Chokoev (IRELAND)

Message: 74317   

Hi,

 

I'm trying to run a microSD card, but unsuccesful for now...

 

I have 2 microSD cards - pqi(Made in Taiwan) and Kingston(made in Japan).

 

With the Kingston card sometimes I have:

mmc_init failed. retval=0x1

No MMC card found

sometimes:

OK! MMC/SD card found.

error in mmc_block_read

 

With the pqi card "OK! MMC/SD card found.", but after the fatls:

bfin> fatls mmc 0

Error: broken fs_type sign

Error: reading boot sector

No Fat FS detected

 

All works fine with a normal MMC/SD card, the problem seems to be only with microSD. What's the difference?...

 

Regards,

Nikolay

QuoteReplyEditDelete

 

 

2009-05-20 04:54:21     Re: microSD problem...

Mike Frysinger (UNITED STATES)

Message: 74318   

 

you didntsay what hardware/driver you're actually using ...

QuoteReplyEditDelete

 

 

2009-05-20 11:59:28     Re: microSD problem...

Nikolay Chokoev (IRELAND)

Message: 74340   

 

Hi Mike,

 

The driver is drivers/mmc/bfin_spi_mmc.c, modified a little to support the hardware. The hardware is a BF527 based board. The driver/hardware is working with a normal MMC/SD card, but not with microSD, that's why I'm wondering if there is any diference between the cards.

 

Does the original driver supports microSD?

QuoteReplyEditDelete

 

 

2009-05-20 23:51:47     Re: microSD problem...

Sonic Zhang (CHINA)

Message: 74344   

 

This driver has only been tested with normal MMC/SD card. Could you try your MicroSD card under kernel? Does it work?

QuoteReplyEditDelete

 

 

2009-05-21 05:54:21     Re: microSD problem...

Nikolay Chokoev (IRELAND)

Message: 74408   

Hi Sonic Zhang,

 

A 'normal' MMC/SD card:

root:/> modprobe mmc_spi

mmc_spi spi0.3: ASSUMING 3.2-3.4 V slot power

mmc_spi spi0.3: requested mode not fully supported

mmc_spi spi0.3: can't change chip-select polarity

mmc_spi spi0.3: SD/MMC host mmc0, no DMA, no WP, no poweroff

root:/> mmc0: host does not support reading read-only switch. assuming write-ena

ble.

mmc0: new SD card on SPI

 

With 'pqi' microSD card:

root:/> modprobe mmc_spi

mmc_spi spi0.3: ASSUMING 3.2-3.4 V slot power

mmc_spi spi0.3: requested mode not fully supported

mmc_spi spi0.3: can't change chip-select polarity

mmc_spi spi0.3: SD/MMC host mmc0, no DMA, no WP, no poweroff

root:/> mmc0: error -84 whilst initialising SD card

 

With 'Kingston' microSD card:

root:/> modprobe mmc_spi

mmc_spi spi0.3: ASSUMING 3.2-3.4 V slot power

mmc_spi spi0.3: requested mode not fully supported

mmc_spi spi0.3: can't change chip-select polarity

mmc_spi spi0.3: SD/MMC host mmc0, no DMA, no WP, no poweroff

root:/>

 

The last two (microSD) cards cannot be mounted after that. The first (SD) is OK!

 

Regards,

Nikolay

 

 

 

 

QuoteReplyEditDelete

 

 

2009-05-23 10:46:01     Re: microSD problem...

Frank Van Hooft (CANADA)

Message: 74473   

 

Take a look at this thread:

 

blackfin.uclinux.org/gf/project/uclinux-dist/forum/

 

There are differences between SD and microSD beyond just their size.

QuoteReplyEditDelete

 

 

2009-05-25 06:02:48     Re: microSD problem...

V Hemanth Kumar (INDIA)

Message: 74533   

 

Nickolay,

 

Are you using "SPI Linux Frame Work" or "Direct Blackfin SPI bus" for the MMC? Use the later one.

 

More important is you should use the GPIO number and not the SPISEL number, i.e., if you are using SPISEL3 then for BF527 it is PF13 which is GPIO_13, so you have to use 13 as your slave select.

 

 

 

Refer the below link:-

 

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:spi_mmc

QuoteReplyEditDelete

 

 

2009-05-25 11:59:39     Re: microSD problem...

Nikolay Chokoev (IRELAND)

Message: 74544   

 

V Hemanth Kumar:

 

The SPISEL is fine, as the SD card works fine, as I wrote before. The problem is *only* with the microSD card for both ucLinux and U-Boot, so I'm wondering if it is a card problem or the card is not supported by U-Boot and/or ucLinux.

 

Did you managed to run microSD card with U-Boot? What about ucLinux? How?

QuoteReplyEditDelete

 

 

2009-05-27 01:13:53     Re: microSD problem...

V Hemanth Kumar (INDIA)

Message: 74630   

 

Hello Nikolay,

 

I have not tried it on uboot but in uclinux I was able to access the 1GB kingston microSD card successfully.

 

As I mentioned earlier, only change I did was instead of mentioning chip_select as 3 for SPISEL3 I used the 13 (GPIO_13). With this I was able to use the card.

 

I think you should cross check the hardware and your software settings once. The MMC code in uClinux distribution works fine.

 

Also try with the uclinux SVN distribution.

QuoteReplyEditDelete

 

 

2009-06-02 04:15:52     Re: microSD problem...

Nikolay Chokoev (IRELAND)

Message: 74951   

 

If it's not working on U-Boot, it doesn't make sense to try Linux, as I want to boot from microSD.

QuoteReplyEditDelete

 

 

2009-06-03 12:55:44     Re: microSD problem...

V Hemanth Kumar (INDIA)

Message: 75130   

 

I don't think uboot supports or has drivers for accessing microSD card.

Attachments

    Outcomes