Re: SDSynchronousBusRequest taking long time
by voidcoder » Wed, 17 Oct 2007 10:33:10 GMT
Why not just step in de{*filter*} and see where
it spends so much time?
Also separate cross posting is evil. List all
target groups in "to" field if you want to post
to multiple groups.
SDSynchronousBusRequest taking long time
by QWR2YWl0 » Wed, 17 Oct 2007 16:40:03 GMT
Hi,
From the SDIO driver we get from Arasan they use SDSynchronousBusRequest()
to issue a bus request to their chip.
We timestamp before and after calling this API, and it takes > 230ms. Why it
takes so long and how can we make it
much faster? The following are the code sample:
SDSynchronousBusRequest(pDevice->hDevice,
SD_CMD_IO_RW_EXTENDED,
argument,
SD_WRITE,
ResponseR5,
&response,
1,
blockLength ,
pBuffer,
0);
where:
argument = BUILD_IO_RW_EXTENDED_ARG(SD_IO_OP_WRITE,
SD_IO_BLOCK_MODE,
pDevice->Function,
wAddress,
SD_IO_FIXED_ADDRESS,
1);
SD_COMMAND_RESPONSE response
Your kind responses are greatly appreciated.
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Wed, 17 Oct 2007 21:32:01 GMT
Sorry I was not aware that I could taget multiple groups in "to" field.
Can you suggest me how to go through the de{*filter*}? The code runs on a
Windows Mobile device. Currently I am debugging by writing to a file. I
thought SDSynchronousBusRequest is a call in a library provided by Microsoft.
How can I step through? I am new to Platform builder.
Thanks for your help.
Re: SDSynchronousBusRequest taking long time
by voidcoder » Thu, 18 Oct 2007 04:37:44 GMT
> Can you suggest me how to go through the de{*filter*}? The code runs on a
> Windows Mobile device. Currently I am debugging by writing to a file. I
>
Well, if you have no possibility to debug on the target device
it is getting more complicated. There are not too much things
you can do about it on a ready made WM5 device. Especially because
the bottleneck may be in the lower level sdcard host controller
driver (device specific) and not in the sdbus driver
or sdcard lib (device independent thing). Try different
WM devices, try to analyze sdcard sources, fortunately you have
PB installed. Look here:
...\WINCExxx\PUBLIC\COMMON\OAK\DRIVERS\SDCARD\SDBUS\*
It is definitely worth buying a development KIT if you
want to untie your hands. Try to google around, there
are enough devkits with SDCARD on board and Windows CE
support ...
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Thu, 18 Oct 2007 12:56:00 GMT
hanks for the much helpful info. We will follow your suggestions to find the
problem.
Associated with this I have some more questions. The SDIO card we have is
NOT identified by the Symbol M70 running Windows Mobile 5.0 after a reboot.
We have to remove the card and re-insert it back for the OS to recognize the
card and load the driver dll. The registry settings are right as the driver
loads successully when we re-insert the card. So questions are:
1. Are there sources in Platform Builder that I can add some print
statements and find out what is happening during the boot process when the
devices are being loaded?
2. Is it possible to write a EXE that I can run to force load the driver
instead of physically re-inserting the card.
"voidcoder" wrote:
Re: SDSynchronousBusRequest taking long time
by voidcoder » Thu, 18 Oct 2007 17:50:54 GMT
> Associated with this I have some more questions. The SDIO card we have is
> NOT identified by the Symbol M70 running Windows Mobile 5.0 after a reboot.
> We have to remove the card and re-insert it back for the OS to recognize the
> card and load the driver dll.
Does M70 recognize any other sdcard after reboot, say sdmemory?
Try turning it off, then insert the memory card and power on.
Is the card detected?
>> 1. Are there sources in Platform Builder that I can add some print
>> statements and find out what is happening during the boot process when the
>> devices are being loaded?
In theory, you can clone sdbus driver/sdcardlib and add some
additional debug output to it. Next you can patch registry
on WM target to load your new sdbus driver instead of original
one. This may or may not work properly, do not forget that
WM is a bit different thing although it is based on CE core.
>> 2. Is it possible to write a EXE that I can run to force load the driver
>> instead of physically re-inserting the card.
No, you can't do that. The client drivers get loaded in response
to the slot state change notification initiated by the host
controller driver (which is normally triggered by the card
detection interrupt). Something what you don't have sources for.
Advait wrote:
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Thu, 18 Oct 2007 18:52:03 GMT
es other cards work fine and are recognized after a reboot.
How do I clone the sdbus and sdcard libraries? I was thinking of changing
the source for these libraries and build their libs. Use these libs when I
compile my dll. Will this NOT suffice? Are the sdbus and sdcard libraries a
separate dll in the system?
"voidcoder" wrote:
Re: SDSynchronousBusRequest taking long time
by voidcoder » Thu, 18 Oct 2007 22:09:03 GMT
It is definitely bad idea to modify public sources
in place. Instead copy SDCARD tree to your platform
directory and correct SOURCES files to build from
there. Or you can use sysgen capture tool (I'm not
a big fun of it):
http://msdn2.microsoft.com/en-us/library/aa459163.aspx
Sdcardlib is a statically linked library containing
various sdcard related functions that you are using
in your client driver. While sdbus driver is a true
standalone driver, sdbus.dll or something like that
on WM devices. I pointed you to the sources.
Advait wrote:
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Sat, 20 Oct 2007 05:28:01 GMT
leg,
Thanks for all your replies.
We were wondering if you will be able to help us out in person. Are you in
Bay Area?
-
Shiva
"voidcoder" wrote:
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Sat, 20 Oct 2007 11:03:00 GMT
leg,
I see the sdbus.dll built in my workspace but when I tried to copy it across
to WM device it says access denied. I cannot even see sdbus.dll in the
\Windows directory BUT when I try to copy it across it shows that the file is
in there and is being overwritten.
Any suggestions on this.
-
Shiva
"Advait" wrote:
Re: SDSynchronousBusRequest taking long time
by voidcoder » Sat, 20 Oct 2007 17:21:26 GMT
>>I cannot even see sdbus.dll in the
How do you see that? If you are using WM File Explorer
make sure "Show All Files" option is turned on.
>> when I try to copy it across it shows that the file is
>> in there and is being overwritten.
I'd suggest you to build the binary using different
file name and then patch registry under:
HKLM\Drivers\Builtin\SDBusDriver
"Dll"="My_SDbus_Driver_With_Debug_Output.dll"
Advait wrote:
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Sat, 20 Oct 2007 22:21:08 GMT
es I have "Show All files" turned on as other dlls show up. Also this dll
does not show up when I connect the handheld to the cradle.
I tried using the SDBus.dll that I built. Changed the filename to SDBus.dll
to SDBus_debug.dll and updated the registry to look at it and rebooted the
device and nothing really shows up after I restart. Does the boot sequence
keep some log somewhere?
Also are you available to help us this problem in person? Are you in Bay
area(San Francisco)?
Thanks
-
Shiva
"voidcoder" wrote:
Re: SDSynchronousBusRequest taking long time
by voidcoder » Tue, 23 Oct 2007 17:52:25 GMT
>>device and nothing really shows up after I restart. Does the boot sequence
>>keep some log somewhere?
No, you can't get any boot log on retail WM device.
That is why I suggested you using a development kit
instead if you want full featured debugging capabilities ...
Keep in mind that some WM devices will not accept
unsigned binaries. You may need to sign your driver
binary first:
http://msdn2.microsoft.com/en-us/library/ms839681.aspx
>>Also are you available to help us this problem in person? Are you in Bay
>>area(San Francisco)?
I'm not in USA and not able to provide offline help.
Like most developers here, I'm full time on my own
projects.
Advait wrote:
Re: SDSynchronousBusRequest taking long time
by QWR2YWl0 » Wed, 24 Oct 2007 02:17:00 GMT
leg,
Can you suggest us a development kit. I will also browse around on the net
but it will be helpful if you suggest some or one that you prefer.
Thanks for your help.
-
Shiva
"voidcoder" wrote:
Re: SDSynchronousBusRequest taking long time
by voidcoder » Wed, 24 Oct 2007 18:19:25 GMT
If your target is WM devices (at least WM5/6), it makes
sense to look for the boards with Windows CE 5.0 support.
I'd suggest you to pick one initially supported by PB
(have a look at ..\WINCE500\PLATFORM\* directory) to not
additionally pay for the BSP itself, note that some OEMs
will separately charge for the BSP ...
For example, have a look at SMDK2410 and Mainstone.
Both are including SDCARD support and both are natively
supported by CE.
If you have in mind playing with different interfaces
as well (not only SDCARD) make sure they are all
included/supported by the dev kit and BSP.
Here you can find some more boards with Windows CE
support:
http://msdn2.microsoft.com/en-us/embedded/aa714506.aspx
Just keep in mind that getting an embedded OS running
is not a 5 min job. You may need to dig a bit deeper
into various building/configuring etc aspects...
Advait wrote:
Similar Threads:
1.SDSynchronousBusRequest takes long time
From the SDIO driver we get from Arasan they use SDSynchronousBusRequest()
to issue a bus request to their chip.
We timestamp before and after calling this API, and it takes > 230ms. Why it
takes so long and how can we make it
much faster? The following are the code sample:
SDSynchronousBusRequest(pDevice->hDevice,
SD_CMD_IO_RW_EXTENDED,
argument,
SD_WRITE,
ResponseR5,
&response,
1,
blockLength ,
pBuffer,
0);
where:
argument = BUILD_IO_RW_EXTENDED_ARG(SD_IO_OP_WRITE,
SD_IO_BLOCK_MODE,
pDevice->Function,
wAddress,
SD_IO_FIXED_ADDRESS,
1);
SD_COMMAND_RESPONSE response
Your kind responses are greatly appreciated.
2.setting flags takes a long long time
in this specific ng with only 2 post not readed, if i pick on icon to mark
all as read
the operation takes a lot of time, and no other operation can be done thus
wm not responding appears faster than mark all finishing its job
as you can suppose the icon mark all appear in tool bar if you customize it
--
Saludos
Antonio
3.Windows Explorer takes a long long time opening any folder
Windows Explorer takes a long long time opening any
folder on my desktop machine. For example if I click on
My computer on the desktop, it will take 6-7 minutes to
display the drives. As a result, I can not open a folder
or save a file into one as the program I am using stops
responding. I have re-installed the windows xp pro a 2nd
time but to no avail. all updates are current and
indexing service is off.
4.PC with XP SP2 takes long long time to log onto windows 2000 domai
After installing XP SP2 in my PC, I find that logging onto a domain with
windows 2000 server SP3 take a long long long time.
However, if I do not connect my PC to the network, logon time is ok.
Can somebody help?
Thanks.
5.Login Scripts - net set time batch file takes long time
Hi,
i am in the main office with 5 other offices connected to it via Frame
Relay. The users in the remote offices login script work well except when the
following script has to execute it takes up to a minute to execute.
This is what a typical login script will look like:
NET USE H: \HOME
NET USE G:\\SERVERNAME\SHARES
NET USE I:\\SERVERNAME\INFO
NET TIME /SET /YES - when it gets to this bad boy it takes up to a minute.
Any ideas??
Thanks
6. http://servername:6749/fpadmdll.dll taking too long time
7. WMP11 takes long time to load song
8. adding media takes Long time