Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: uSD card problem on AT91SAM9G45 based board linux4sam 2.6.30
PostPosted: Tue Nov 01, 2011 5:51 pm 
Offline

Joined: Fri Dec 10, 2010 12:17 am
Posts: 5
On our custom board we are having an intermittent problem with our uSD card. We are using only the first HSMCI port, with a bus width of 4 (SD/SDIO). We are using the same kernel configuration we had been using on our G45 eval kit, which is the following:

(on the 2.6.30 kernel, with the at91 and the at91-exp.4 patchsets applied) (http://www.at91.com/linux4sam/bin/view/ ... inuxKernel)

#
# OTG and related infrastructure
#
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_AT91 is not set
CONFIG_MMC_ATMELMCI=y
CONFIG_MMC_ATMELMCI_DMA=y
# CONFIG_MMC_SPI is not set
# CONFIG_MEMSTICK is not set
# CONFIG_ACCESSIBILITY is not set


On the eval kit, everything works fine (4GB SD card). On our custom board, everything works fine MOST of the time. Some of the time however, on a power cycle to the board, the uSD card we have in the slot (32GB) \gets detected as a 30.8 MB card, and fails to mount. Rebooting (without power cycling) does not help and the only solution is to power cycle the board again and hope that the card detects properly (as 29.7 GB).

In searching around online, it appears this problem may be common to embedded other products using embedded linux (even the 30.8 MB detection number for 32GB cards).

Any ideas?

Thanks!


Top
 Profile  
 
 Post subject: Re: uSD card problem on AT91SAM9G45 based board linux4sam 2.6.30
PostPosted: Tue Nov 01, 2011 6:13 pm 
Offline

Joined: Wed May 25, 2011 9:44 am
Posts: 31
hi mark,

It is usual for cards to vary in their memory Size. For me, in the 4GB Cards, cards are around 3.6G - 3.9G. And this number varies across manufacturers. (As a safeguard to this you should always leave some unallocated space in your SD Card)

But this memory size is always same for one card. The memory size does not change when the board is rebooted.

-Pj


Top
 Profile  
 
 Post subject: Re: uSD card problem on AT91SAM9G45 based board linux4sam 2.6.30
PostPosted: Tue Nov 01, 2011 7:20 pm 
Offline

Joined: Fri Dec 10, 2010 12:17 am
Posts: 5
Thanks for the response Pj, I agree and have noticed that behavior before. Unfortunately this one is a little more serious:

30 mega bytes vs. 29.7 giga bytes

When the card is detected as a mere 30.8 MB, I can't mount it or anything (which makes sense since the size is so much smaller) -- partition table can't be read, can't mount as my normal ext3.

Have you ever run into something like that?

Thanks!

-Mark


Top
 Profile  
 
 Post subject: Re: uSD card problem on AT91SAM9G45 based board linux4sam 2.6.30
PostPosted: Wed Nov 02, 2011 9:03 am 
Offline

Joined: Wed May 25, 2011 9:44 am
Posts: 31
Hi mark,

I missed the 'MB' after 30.8 and misunderstood your post.
No I have not come across such a case yet.

If a software configuration works on the eval kit, but the same configurations works at times on the custom designed board, then this MAY POINT to hardware issues (PCB design, high speed, etc...). What you may give a try, reduce the speed of the master clock and see if you still have the same observations.

This is the test I would have done in your scenario. If you do try, then do posts the results.

-Pj


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron