*** tpb has joined #litex | 00:00 | |
*** somlo has quit IRC | 00:08 | |
*** somlo has joined #litex | 00:11 | |
*** futarisIRCcloud has joined #litex | 00:42 | |
*** futarisIRCcloud has quit IRC | 05:42 | |
xobs | I notice that there's a `spi.py` SPI block. Is there any example of how to use it? | 06:07 |
---|---|---|
xobs | For 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 #litex | 06:27 | |
_florent_ | Hi xobs, here is an example to control an ad9154 with litex_server: https://hastebin.com/emepenejad.m | 06:41 |
_florent_ | for hmc830 and 7043: https://hastebin.com/axolitibid.rb | 06:42 |
xobs | Hi _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 |
xobs | Also, 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 separately | 07: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 time | 07:37 |
xobs | Okay, so this will send some number of bytes, then read some number of bytes. Got it. | 08:25 |
*** futarisIRCcloud has quit IRC | 09:07 | |
*** daveshah has quit IRC | 18:39 | |
*** daveshah has joined #litex | 18:40 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!