linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [QUERY] Behavior of spi slave memories w.r.t chip select signal.
@ 2011-05-11  4:07 viresh kumar
  2011-05-11  7:17 ` Jamie Iles
       [not found] ` <4DCA0B77.8060700-qxv4g6HH51o@public.gmane.org>
  0 siblings, 2 replies; 7+ messages in thread
From: viresh kumar @ 2011-05-11  4:07 UTC (permalink / raw)
  To: spi-devel-general
  Cc: Dinesh Kumar SHARMA, linus.walleij@stericsson.com,
	Armando VISCONTI, Shiraz HASHIM, Vikas MANOCHA,
	linux-arm-kernel@lists.infradead.org


Hello,

Following is what i understood after reading m25p80 driver and spi master
drivers in drivers/spi folder.

"chip_select signal controls start and end of transfer. For ex: if we have to read
status reg of spi memory, then we use write_and_then_read() routine. which writes
0x9F in one spi transfer and writes dummy bytes and reads rx reg in other transfer.
And these two transfers are part of single spi_message.

Now, it is controllable to handle cs, and if we send cs_change == 0, then chip select
is activated at start of message and deactivated at end of message, instead at end
of every transfer.

Which means, even if there is a delay between command and dummy bytes received at
spi memory, current transfer will not be terminated by memory as cs is low."

Is this correct??

Actually i am seeing a different behavior by some of the spi memories, like m25p10.
If there is a delay between read_sts_reg command and dummy bytes, then 0xFFFFFF is
returned in response. If there is no delay then transfer always passes.

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-13  9:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11  4:07 [QUERY] Behavior of spi slave memories w.r.t chip select signal viresh kumar
2011-05-11  7:17 ` Jamie Iles
2011-05-11  7:19   ` viresh kumar
     [not found] ` <4DCA0B77.8060700-qxv4g6HH51o@public.gmane.org>
2011-05-13  3:52   ` viresh kumar
     [not found]     ` <4DCCAB19.2020302-qxv4g6HH51o@public.gmane.org>
2011-05-13  6:54       ` Linus Walleij
     [not found]         ` <BANLkTik2OxGdQ7z1JBAsE+=gc5UCgx3wEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-13  9:20           ` viresh kumar
2011-05-13  9:04     ` Jamie Iles

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).