From: "Kevyn-Alexandre Paré" <kapare-7qmld2CjetYf4mhTGKTGE9BPR1lH4CV8@public.gmane.org>
To: Jassi Brar <jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
gumstix-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: How to mesure current SPI transfer speed
Date: Mon, 10 Jan 2011 20:25:00 +0000 [thread overview]
Message-ID: <1294691100.5312.16.camel@andromeda> (raw)
In-Reply-To: <AANLkTimexzqAafU7dWj8QY1Oaac5wUoEj=pp6gqkcuqE-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Sat, 2011-01-08 at 11:16 +0900, Jassi Brar wrote:
> On Sat, Jan 8, 2011 at 3:51 AM, Kevyn-Alexandre Paré
> <kapare@rogue-research.com> wrote:
> > 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);
>
> Transfer speed is tightly linked to MOSI/MISO bit rates.
> But the overall throughput would depend on the protocol that
> you run over SPI.
Effectively, but how to monitor that I respect, for example, a
requirement of 5Mbps with a chip... I'm already sending data at
#define SPI_BUS_SPEED 5000000
spi_device->max_speed_hz = SPI_BUS_SPEED;
So does this settings ensure it to always be at 5Mhz?
I will try to test it by settings it to higher speed to see what happen
ex: 48000000 (48Mhz)
Regards,
--
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
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
next prev parent reply other threads:[~2011-01-10 20:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-07 18:51 How to mesure current SPI transfer speed Kevyn-Alexandre Paré
2011-01-08 2:16 ` Jassi Brar
[not found] ` <AANLkTimexzqAafU7dWj8QY1Oaac5wUoEj=pp6gqkcuqE-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-10 20:25 ` Kevyn-Alexandre Paré [this message]
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=1294691100.5312.16.camel@andromeda \
--to=kapare-7qmld2cjetyf4mhtgktge9bpr1lh4cv8@public.gmane.org \
--cc=gumstix-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.