This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: PCMCIA Standard CIS access
- To: "Trenton D. Adams" <tadams at extremeeng dot com>, "'eCos discussion'" <ecos-discuss at sources dot redhat dot com>
- Subject: Re: [ECOS] PCMCIA Standard CIS access
- From: "Lewin A.R.W. Edwards" <larwe at larwe dot com>
- Date: Wed, 27 Jun 2001 18:52:52 -0400
> From what I understand, the card does not have to have power enabled in
>order for me to read it's CIS. Correct? If so, does anyone know what
>MIGHT be the problem with reading the CIS? I keep getting a READ FAIL
>interrupt when attempting to read the Card Information Structure. Is
>there maybe a standard reason in most PCMCIA controllers why this might
>happen? I doubt it! LOL
You need to refer to the PCMCIA spec here. Don't quote me on this, and
above all don't implement anything based solely on my say-so, but IIRC the
powerup process goes something like this:
* socket power cut off
* when both card detect pins go active (indicating card fully inserted),
wait for some period of time (defined in the spec) and check the LVD1/LVD2
pin state to see what the card expects for Vcc.
* apply Vcc to the card and wait some period of time (defined in the spec)
for the card to power up.
* read CIS.
* even if your card is an old flash device requiring Vpp=12V, you should be
able to use it in read-only mode with no Vpp applied.
Most PCICs with integrated power switching will automatically cut socket
power and tristate all outputs going to the socket when either card detect
pin floats (indicating card at least partially ejected).
You most definitely do need to power the card in order to read its CIS. And
it most definitely IS possible to damage cards by setting up the wrong
supply voltages. It is also conceivable that you could damage PCMCIA cards
by applying signals when the card isn't powered.
BTW, if the card is a CF card, it will always be safe (and always possible
to read the CIS) by powering it up at 3.3V. CF cards by design must operate
at both VCC voltages.
This is why I suggested Linux, since it will take care of all the PCMCIA
details for you, and you wouldn't even need to write drivers for many
common cards...
-- Lewin A.R.W. Edwards
Embedded Engineer, Digi-Frame Inc.
Work: http://www.digi-frame.com/
Tel (914) 937-4090 9am-6:30pm M-F ET
Personal: http://www.larwe.com/ http://www.zws.com/
"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
(Theodore Roosevelt)