sigrok/pulseview support

Applications, development tools, FPGA, C, WEB
Post Reply
dvc
Posts: 5
Joined: Sun Mar 04, 2018 6:45 pm

sigrok/pulseview support

Post by dvc » Sun Mar 04, 2018 6:57 pm

Hi,

I started hacking on a sigrok redpitaya driver and I'm looking for a python example or scpi example for how to use the logic analyzer pro. I've seen `DIG:PIN? <pin>`, but am looking for something like `ACQ:START`. I looked for the logicanalyzer application in the redpitaya free applications directory, but it looks like the source code for the logic analyzer app isn't available.

Thanks,
David
Last edited by dvc on Tue Mar 20, 2018 2:59 pm, edited 1 time in total.

dvc
Posts: 5
Joined: Sun Mar 04, 2018 6:45 pm

Re: scpi logic analyzer

Post by dvc » Tue Mar 20, 2018 2:48 pm

So I decided to implement my own driver/tcp server
Screenshot from 2018-03-20 14-43-14.png
src is available here:
github.com/dvc94ch/libsigrok
github.com/dvc94ch/redpitaya-mercury

the only remaining problem is how to use interrupts. the python code doesn't use any. So currently I'm filling the buffer, sending the buffer, restarting state machine. there are missing samples during the sending the buffer part, so there should be some kind of half full interrupt somewhere.
You do not have the required permissions to view the files attached to this post.

amike88
Posts: 89
Joined: Tue Mar 29, 2016 7:41 pm

Re: sigrok/pulseview support

Post by amike88 » Tue Mar 20, 2018 3:23 pm

This bit of documentation can be helpful.

dvc
Posts: 5
Joined: Sun Mar 04, 2018 6:45 pm

Re: sigrok/pulseview support

Post by dvc » Tue Mar 20, 2018 4:25 pm

The problem is that they aren't used anywhere. /dev/uio/ps2pl is the only device that allows enabling interrupts. echo 'x01' > /dev/uio/la gives an error. I'll have to decipher the dtso [0] and maybe the rtl. I'm not really fluent in system verilog...

[0] github.com/RedPitaya/RedPitaya/blob/master/fpga/prj/mercury/dts/fpga.dtso

dvc
Posts: 5
Joined: Sun Mar 04, 2018 6:45 pm

Re: sigrok/pulseview support

Post by dvc » Tue Mar 20, 2018 5:12 pm

So I suspect that no interrupts are implemented yet, because it never terminates. Can someone please confirm?

```rust
let hwid = HwId::new();
hwid.show();

let mut ps2pl = Interrupt::new();
ps2pl.enable();

// setup logic analyzer
let mut la = LogicAnalyzer::new();
la.default();
la.set_input_mask(0xffff);
la.set_trigger_pre(la::BUFFER_SIZE / 2);
la.set_trigger_post(la::BUFFER_SIZE / 2);
la.set_decimation(1000);
la.set_sync_source(SyncSource::La);
la.set_trigger_source(TriggerSource::La);
la.show();

thread::sleep(time::Duration::from_millis(1000));

// reset and start
la.reset();
la.start_trigger();

println!("Wait for interrupt");
let res = ps2pl.wfi();
println!("Received interrupt {}", res);
```

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 24 guests