Re: Sd card detect
- From: seshucherukuri@xxxxxxxxx
- Date: 10 Oct 2006 22:03:22 -0700
hello Henrik,
is it that after my host controller registration
SDHCDRegisterHostController success only the card detection mechanism
starts.
please can u guide me how to detect the card.
thanks
Seshu
seshucherukuri@xxxxxxxxx wrote:
here it seems next step is my hardware dependent code.
please let me know whether i have to write my own platform specific
code like impl.c(which is implemented for mainstone) for host
controller driver interface or i can write the same things in my
initialization it self with out any separate file.
please help me.
thanks
seshu
seshucherukuri@xxxxxxxxx wrote:
yes firstly my DLL entry is not called.
now over come that error. presently i am facing some data abort error
please check ,my debug messages
0x86ba0d7c: SDBusDriver: PROCESS_ATTACH 0x86ba0d7c: SDBusDriver:
+SDC_Init
0x86ba0d7c: SDBusDriver: Initialize: Using request list depth of 48
entries
0x86b3dd7c: SDBusDriver: BusRequestCompleteDispatch Work Item
Starting Up
0x86ba0d7c: SDBusDriver: Bus Driver instance created : 0x00031E60 !
-SDC_Init
0x86ba0d7c: DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\SDHCBase\BusPrefix) ret
urned 2
0x86ba0d7c: SDHCDGetHCFunctions: +Init
0x86ba0d7c: SDHCDGetHCFunctions:
-Init
SDH: +SDH_Init
SDH: +DAVINCI SDHC Initialization
SDH: Active RegPath: Drivers\Active\4294967283
SDH: Real RegPath: 0x86ba0d7c: SDBusDriver: Host Controller "Lubbock"
assigned number 0
0x86b8ad3c: SDBusDriver: SlotStatusChange Work Item Starting Up
0x86ba0d7c: Data Abort: Thread=86ba0d7c Proc=8034c6c0 'device.exe'
0x86ba0d7c: AKY=00000005 PC=03dc4ca0(sdhcbase.dll+0x00004ca0)
RA=03dc4c40(sdhcba
se.dll+0x00004c40) BVA=03e480dc FSR=0000000f
0x86ba0d7c: SDBusDriver: Exception caught ExceptionCode:0xC0000005,
flags:0x0000
0000, Code Address 0x03DC4CA0
0x86ba0d7c: Exception: EXCEPTION_ACCESS_VIOLATION
0x86ba0d7c: Write Access Exceptioned at VAddress :
0x03E480DC
0x
86ba0d7c: SDBusDriver: Host Controller: Lubbock Init Handler failed:
0xC0000003
Can you please let me know where i am missing the track?
thanks
seshu
Henrik Viklund wrote:
I don't really understand what you're asking here, but I get the
feeling you're missing some *very* basic knowledge. It should be
obvious that the sdhc driver needs to be a dll and that it needs to be
included in the image.
Writing a sdhc driver is a challange even for an experianced developer
and I feel it's just not doable to baby-step you through this in the
detail level you seem to require.
Henrik Viklund
http://www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
hello henrik,
when i clone SDIO SD host controller driver from my catalog i have got
SDHC_LIB
SDHCBase
SDHCLib
included in my project work space.
here SDHCBase is the host controller driver code.
Can i take this as my reference and make changes accordingly to my
platform?
can i convert SDHCBase Library into DLL and load this Dll in my
platform?
can you please help out
thanks
seshu
seshucherukuri@xxxxxxxxx wrote:
Thanks Henrik,
can you please let me know the procedure for card detection.i have
inserted the card in my development board.
here is the debug messages i observed,.
0x86ba0d7c: DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\SDBus
Driver\BusPrefix) returned 2
0x86ba0d7c: SDBusDriver: PROCESS_ATTACH
0x86ba0d7c: SDBusDriver: +SDC_Init
0x86ba
0d7c: SDBusDriver: Initialize: Using request list depth of 48 entries
0x86b3dd7c
: SDBusDriver: BusRequestCompleteDispatch Work Item Starting Up
0x86ba0d7c: SDBu
sDriver: Bus Driver instance created : 0x00031E50 ! -SDC_Init
0x86ba0d7c: DEVICE
!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\SDHC\BusPrefix) returne
d 2
SDH: +SDH_Init
SDH: +SDHC Initialization
SDH: Activ
e RegPath: Drivers\Active\4294967283
0x86ba0d7c: PXA27X SDIO Driver: DEBUGCHK fa
iled in file
c:\macallan\public\common\oak\drivers\sdcard\sdhclib\sdhclib.cpp at
line 85
can you please guide me how to handle my interrupt initialize....
whether my OAL init part will do or i have to do in my controller
initialization?
thanks
seshu
Henrik Viklund wrote:
"impl.c" contains a lot of platform specific code, because that's just
what it is -it's the MainstoneII board specific part of the driver!
The hardware specific part of the mainstone driver consist of a CPU
specific part (that reside under the PXA27x CSP directory) and a board
specific part that reside under the mainstone BSP (that handle signals
related to the sdhc, but whos implementation depend uppon the board
design, such as "card detect" and write protect").
Since I understand it as you're not targeting a mainstone board, or
even a PXA27x CPU, these libs are of marginal use to you other than
that it may be a good idea structure your driver in a similar way, and
that you get an idea of how the interface between the hardware specific
libs and the generic libs work.
Henrik Viklund
http://www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
hello henrik,
i am facing some problems with the FPGA interrups on the mainstonell
board.
as my board does not contain any FPGA, please suggest me some good way
to detect the card.
i am successfully loading the bus driver and after tht i am facing the
proble.
plz suggest me whether i can use the impl.c file provided in mainstone
BSP. where this file is fully the platform specific code for SD card in
mainstoneii.
thanks
seshu
seshucherukuri@xxxxxxxxx wrote:
hello henrik,
i am presently working on the initialization of controller file,
here i am having the base address for my board i am including this in
my initialization mapping with my device driver.
my board does not contain any FPGA
i have to write a platform specific code (impl.c)
// platform specific functions
BOOL InitializeHardware();
void UnInitializeHardware();
BOOL LoadPlatformRegistrySettings( HKEY hKeyDevice );
void MMCPowerControl( BOOL fPowerOn );
BOOL IsCardWriteProtected();
BOOL IsCardPresent();
BOOL SetupCardDetectIST(void *pContext);
void CleanupCardDetectIST();
i can't get what is the base address for my initializehardware?
can u give some inputs for the same.
thanks.
seshucherukuri@xxxxxxxxx wrote:
thanks for the input.
here my understanding goes that i have handle the open drain mode or
push pull mode in my controller implementation. is my understanding
correct?
ok i have gone thru the PXA code and Samsung code for SD/MMC
here thy used the GPIO registers for configuring the CLK,CMD and DATA
pins.
as per my data *** i am not having any GPIO registers.
we had only the SD/MMC control registers. here it includes the Clock
control registers etc.,
can i assume my SD/MMC registers as base and configure the same?
thanks,
seshu
Henrik Viklund wrote:
"open-drain" refer to the electrical characteristics of the bus. At
least for MMC, the CMD line start with an open-drain configuration and
when initiation is done it switches to a push-pull mode (for faster
command transfers). All this is usually automatically handled by the
MMC controller.
Henrik Viklund
http://www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
Hi Henrik,
i am doing well.
here my data *** tells that the procedure for card identification is
issued in open drain bus mode for MMC and Sd cards.
what is meant by this open drain mode?
is there any changes i have to make in my bus driver for my card
identification? as per the open drain mode.
thanks,
seshu
Henrik Viklund wrote:
Seshu, my objective in this thread has only been to point you in the
right direction. You have to put in the effort. You need to roll up
your sleves and aquire the bulk of the knowledge you need on your own.
To figure out the DMA stuff -and all other core knowledge needed to
pull this driver thing off- I would read the developers manuals for the
hardware to get the basics down, research any existing implementations
in your BSP, PB or for other OS or examples that can be found on the
net, do extensive experimenting etc.
Henrik Viklund
http://www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
thanks Henrik for the prompt replies.
here i got a big question for you.
i have to support for EDMA transfers for read/write to SD card.
my soc is combination of both ARM and DSP.
how to take care of this.
thanks,
seshu
Henrik Viklund wrote:
Obvioulsy you must implement the processor specific parts. If you
conform to the defined interfaces you can take advantage of all the
helper libs which will ease the burden conciderably, yes.
Henrik Viklund
http://www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
thanks Henrik.
i have gone through the source files and check for the differenct
libraries included for my driver.
by this all observation it seems i dont need to change many things to
implement.
i have to take care my processor specific settings.
is all my assumption correct.
or else wht i need to do more.
thanks
seshu
Henrik Viklund wrote:
OK. You've not looked close enough, then ;-). The *processor* specific
code with all the tricky IO stuff resides under
"\WINCE500\public\common\oak\CSP\arm\intel\pxa27x\sdhc\". It is common
practice (well, it should be anyway...) to layer a driver into CPU
specific libs, board specific libs etc. If you right-click on the
mainstoneII sdhc driver project in the file view and select "open"
you'll open the sources file. There you can see what libs where linked
together to form the driver.
Henrik Viklund
http://www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
thanks Henrik,
here i would like to know, how my card read and write operation is
done.
i have gone through the PXA27x code for SD card,i have not seen any
where the read/write operation for the same. whether i have to do any
modifications for Client driver to peform the same.
and also how my driver is loaded?
thanks,
seshu
Henrik Viklund wrote:
You need to read the docs and look at the sourcecode. It is practically
impossible to answer this kind of general question about such complex
architecture over a medium such as a usnet group.
Henrik Viklund
http:www.addlogic.se
seshucherukuri@xxxxxxxxx wrote:
Thanks Henrik.
here i would like to know how my host controller driver is
communicating with the bus and client drivers.
what all i need to do to achieve this target?
thanks,
seshu
Henrik Viklund wrote:
Read "Developing a Device Driver > Windows CE Drivers > Secure Digital
Card Drivers" in the PB5 help.
Check out "\WINCE500\public\common\oak\drivers\sdcard\" for the source
for the sd card related drivers and helper libs.
An example implementation sdhc driver:
"\WINCE500\PLATFORM\MAINSTONEII\src\drivers\sdhc\"
Henrik Viklund
http://www.addlogic.se
seshucheruk...@xxxxxxxxx wrote:
Thanks Henrik for the prompt reply.
i am very confused now.
as these days i have gone through the block driver architecture in
WinCE and prepared to start with the implementation of client drivers.
as i thought only the registry settings have to be changed in host
controller driver.
would you please give me some inputs from your side how to proceed with
my task.
as i am new to this driver development in Windows CE.
and present from where to start?
and if you suggest me to go through some documents for help it will be
a good thing.
thanks,
seshu
Henrik Viklund wrote:
As I said in the other post you normally only need to implement a host
controller driver that abstracts your hardware to the host controller
driver interface. This way you can utilize the bus and class drivers
that are provided with CE5.
Henrik Viklund
http://www.addlogic.se
seshu wrote:
Hi,
I am developing SD card driver for the ARM926EJS processor in winCE 5.0
here i am developing the client driver as a block driver.
can i consider this as an ATA type driver?
whether I have to develop the host controller driver and the bus driver
or not?
thanks,
seshu
.
- References:
- Re: open drain mode Sd cards
- From: seshucherukuri
- Re: open drain mode Sd cards
- From: Henrik Viklund
- Re: open drain mode Sd cards
- From: seshucherukuri
- Re: Initialize hardware for SD card
- From: seshucherukuri
- Re: Initialize hardware for SD card
- From: seshucherukuri
- Re: Initialize hardware for SD card
- From: Henrik Viklund
- Re: Initialize hardware for SD card
- From: seshucherukuri
- Re: Initialize hardware for SD card
- From: seshucherukuri
- Re: Initialize hardware for SD card
- From: Henrik Viklund
- Re: Initialize hardware for SD card
- From: seshucherukuri
- Re: Initialize hardware for SD card
- From: seshucherukuri
- Re: open drain mode Sd cards
- Prev by Date: Re: How to resolve the problem of resume and suspend of usb kitl?
- Next by Date: More than 10 instances of a device in Windows CE 5.0
- Previous by thread: Re: Initialize hardware for SD card
- Next by thread: Re: How Can we avoid the sysgen errors?
- Index(es):
Loading