From: "Kevyn-Alexandre Paré" <kapare-7qmld2CjetYf4mhTGKTGE9BPR1lH4CV8@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
gumstix-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: How to mesure current SPI transfer speed
Date: Fri, 07 Jan 2011 13:51:59 -0500 [thread overview]
Message-ID: <1294426319.3892.11.camel@andromeda> (raw)
Hi,
What's the best way to calculate the current SPI transfer speed?
Right now I use something like that and transfer one spi_message with 1
spi_transfer of 100000 bytes and I do the math... I know that this is
not accurate and was wondering if anyone have a better way?
struct timeval tv_before;
struct timeval tv_after;
do_gettimeofday(&tv_before);
status = spi_sync(spike_dev.spi_device, &spike_ctl.msg);
do_gettimeofday(&tv_after);
long elapsedTime = (tv_after.tv_usec - tv_before.tv_usec);
Thx
--
Kevyn-Alexandre Pare
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
next reply other threads:[~2011-01-07 18:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 18:51 Kevyn-Alexandre Paré [this message]
2011-01-08 2:16 ` How to mesure current SPI transfer speed Jassi Brar
[not found] ` <AANLkTimexzqAafU7dWj8QY1Oaac5wUoEj=pp6gqkcuqE-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-10 20:25 ` Kevyn-Alexandre Paré
2011-01-12 2:29 ` Jassi Brar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1294426319.3892.11.camel@andromeda \
--to=kapare-7qmld2cjetyf4mhtgktge9bpr1lh4cv8@public.gmane.org \
--cc=gumstix-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).