Hi Massimiliano,

If you run your command with -l 4 option you should see the output like the 
following. I think that can work for your use case to identify MOSI and MISO 
lines.

sigrok-cli -i mx25l1605d_probe.sr -P 
spi:wordsize=8:cs=CS\#:clk=SCLK:mosi=MOSI:miso=MISO -A 
spi=miso-transfer:mosi-transfer -l 4

[. . .]
5991362-6009713 spi-1: miso-transfer: "FF C2 20 15"
5991362-6009713 spi-1: mosi-transfer: "9F FF FF FF"
6015830-6057950 spi-1: miso-transfer: "FF C2 20 15"
6015830-6057950 spi-1: mosi-transfer: "9F FF FF FF"
6061683-6109695 spi-1: miso-transfer: "FF C2 20 15"
6061683-6109695 spi-1: mosi-transfer: "9F FF FF FF"
6115310-6159691 spi-1: miso-transfer: "FF C2 20 15"
6115310-6159691 spi-1: mosi-transfer: "9F FF FF FF"
6165812-6209683 spi-1: miso-transfer: "FF C2 20 15"
6165812-6209683 spi-1: mosi-transfer: "9F FF FF FF"
6215803-6259676 spi-1: miso-transfer: "FF C2 20 15"
6215803-6259676 spi-1: mosi-transfer: "9F FF FF FF"
[. . .]
Regards

Marc - BZ17 Development

[image]

Enviat amb el correu segur de [Proton Mail](https://proton.me/).

------- Original Message -------
El dimecres, 10 de maig 2023 a les 18:48, Massimiliano Cialdi 
<cia...@gmail.com> va escriure:

> Hello,
>
> I apologize for the duplicate message, the subject was missing in the 
> previous message
>
> I need to decode SPI from a .sr file on command line.
>
> I use this command line:
>
> sigrok-cli -i test.sr -P spi:wordsize=8:cs=2:clk=0:mosi=1:miso=3 -A 
> spi=miso-transfer,mosi-transfer
>
> and I get an output like this (I left only the first bytes of the 
> transactions that are normally 279 bytes long, and took only a few lines) :
> [...]
> spi-1: 5A 01 01 10 FF FF 00 00...
> spi-1: 5A 01 01 10 00 00 00 00 ....
> spi-1: 5A 01 01 10 FF FF 00 00....
> spi-1: 5A 01 01 10 00 00 00 00 ...
> [...]
>
> How can I tell which line is miso and which line is mosi?
> Is it guaranteed that miso and mosi are always alternated? If so which one 
> appears first?
> Is it guaranteed that the number of lines is always even?
> Is it guaranteed that it cannot "skip" a line?
> Are they perhaps in the order in which I specify the annotation on the 
> command line (so if I reverse them on the command line they also reverse in 
> the list)?
> Is there any way to change the string "SPI-1" so that it is more intuitive?
>
> If I have two SPI streams in the acquisition, how do I decode both of them?
>
> best regards
>
> --
>
> Et nunc, auxilium solis, vincam!
> Oppugnatio solaris!
> VIS!
>
> Massimiliano Cialdi
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to