Wednesday, 2019-03-20

*** tpb has joined #litex00:00
*** somlo has quit IRC00:08
*** somlo has joined #litex00:11
*** futarisIRCcloud has joined #litex00:42
*** futarisIRCcloud has quit IRC05:42
xobsI notice that there's a `spi.py` SPI block. Is there any example of how to use it?06:07
xobsFor example, right now I need to send 4 bytes, then read some bytes back (so a 6-byte transfer). Is that possible?06:07
*** futarisIRCcloud has joined #litex06:27
_florent_Hi xobs, here is an example to control an ad9154 with litex_server: https://hastebin.com/emepenejad.m06:41
_florent_for hmc830 and 7043: https://hastebin.com/axolitibid.rb06:42
xobsHi _florent_ , thanks for the examples!  It looks like they're writing one byte at a time. Do they hold CS, or is it de-asserted after every byte pair?07:12
xobsAlso, one thing I'm not entirely sure of: if I disable half_duplex, do writes and reads happen at the same time?  I'm thinking one option may be to either wire up CS to a GPIO and toggle it separately, or set a bit to make it persistent in the SPI block.07:13
_florent_The core hold CS just for the duration of the transfer (can be multiple bytes), but yes sometime to ease things i'm controlling CS separately07:30
_florent_for SPI, half duplex only allow to have a single data line, but even in full duplex writes and reads are generally not happening at the same time07:37
xobsOkay, so this will send some number of bytes, then read some number of bytes.  Got it.08:25
*** futarisIRCcloud has quit IRC09:07
*** daveshah has quit IRC18:39
*** daveshah has joined #litex18:40

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!