Glomation
 
Advanced Search
Welcome, Guest. Please login or register.

Login with username, password and session length
May 20, 2012, 01:55:23 AM
News: Glomation introduced new wireless ready low cost GESBC-9260S
Pages: [1]
Topic Tools  
Read July 07, 2009, 06:28:40 PM #0
aaronpaulhughes

SD card only works if it is present during power on?????

I made a directory
mkdir /mnt/sdcc

I then use this command to mount the SD card
mount -t vfat /dev/mmcblk0p1 /mnt/sdcc

This works and all is well. But this *only works* as long as the card is present during boot up. Why is that? Has anybody else noticed this?
I also notice during bootup that the messages
mmc0: host does not support reading read-only switch.  Assuming write-enable.
mmc0: new SD card at address f15b
mmcblk0: mmc0:f15b S016B 14560KiB
 mmcblk0: p1

Plus I noticed that when I plug in a USB flash drive, a lot of information pops up on the screen indicating that the OS has detected it. What process does that? Is there one that should be running for SD cards but isn't by default, i.e. so I see the messages from mmc0 like at bootup??

Thanks,
Aaron
 
Read July 07, 2009, 07:10:51 PM #1
LoialOtter

Re: SD card only works if it is present during power on?????

I'm a little new to this too, but do have a little info:
USB is enumerated by the kernel and the driver for the device is selected at that point.

The MMC/SD driver is also built into the kernel. I'm just checking how it does it's detect.

It may be required to get something like HAL to get this type of thing working.

It looks like the detect pin is not connected in the hardware design (based on AT91SAM9260EK which i think this board is based on). This means that detection either needs to be through probing or through other more unusual means.

If you're doing only a few boards and don't mind doing a modification to them, you can do a hardware modification that'll give this feature. The 8th pin from the J13 label is the detect pin. It gets pulled to ground on connect. If you wire this to one of the GPIO lines with a pull-up resistor (10k or 100k or the like) to 3.3V and then modify the kernel (arch/arm/mach-at91/board-sam9260ek.c under "static struct at91_mmc_data..." uncomment .det_pin and configure it to be the right IO, "AT91_PIN_PC31" for example) then recompile and upload. This may also require changing the polarity of that pin in the kernel, I'm not sure where to do that.
« Last Edit: July 07, 2009, 09:19:56 PM by LoialOtter »
 
Read July 08, 2009, 10:01:30 AM #2
admin

Re: SD card only works if it is present during power on?????

The current hardware design and kernel driver does not support SD card hot plug-in.
 
Pages: [1]
Jump to:  

Theme Update by Runic Warrior Originally created by m3talc0re