Simple sampling using PuTTY

Just about everything about Red Pitaya
Post Reply
srb53
Posts: 4
Joined: Wed Jul 02, 2014 11:24 am

Simple sampling using PuTTY

Post by srb53 » Wed Sep 17, 2014 11:01 am

Could somebody please tell me what i'm doing wrong.

i am trying to sample a short pulse using PuTTY on windows 7.
I have an 80 µs pulse (to measure) with an 80 µs, 500 mV trigger pulse overlapping with it's negative edge 40 µs into the measured pulse.

I use the following commands:

redpitaya> monitor 0x40100000 0x1 - Reset write state machine
redpitaya> monitor 0x40100014 0x1024 - Set decimation to 1024 (~8 µs between samples)
redpitaya> monitor 0x40100014 - Check decimation
0x00001024 - Readback confirmed correct decimation
redpitaya> monitor 0x4010000c 0x811 - Set Channel B threshold to ~ 0.3 V
redpitaya> monitor 0x4010000c - Check threshold
0x00000811 - Readback confirmed correct threshold
redpitaya> monitor 0x40100000 0x0 - Arm trigger
redpitaya> monitor 0x40100004 0x5 - Set trigger to Ch B threshold negative edge
redpitaya> monitor 0x40100004 - Check for trigger source to go to 0 (confirmed trigger)
0x00000000 - Trigger confirmed
redpitaya> monitor 0x4010001c - Read trigger write pointer address
0x00003d34 - Address read back
redpitaya> monitor 0x40113d34 - Attempt to read value
Segmentation fault - Read failed due to segmentation
redpitaya> monitor 0x401131fc - Try again at the start of the segment
0x00002de1 - value read back as 2de1 Hex (11745 ADC value)

If i use the acquire tool with the same decimation i can see the two pulses with 10 correctly measured samples and the timing is as i see on my oscilloscope.

Am i making an obvious mistake? if i use a much longer pulse (200 µs) it seems to work.

Thanks in advance

Steve

BBorut
Posts: 2
Joined: Sat Sep 20, 2014 7:16 pm

Re: Simple sampling using PuTTY

Post by BBorut » Sat Sep 20, 2014 7:40 pm

If I try your sequence it seems working fine:

redpitaya> monitor 0x40100000 0x1
redpitaya> monitor 0x40100014 0x1024
redpitaya> monitor 0x40100014
0x00001024
redpitaya> monitor 0x4010000c 0x811
redpitaya> monitor 0x4010000c
0x00000811
redpitaya> monitor 0x40100000 0x0
redpitaya> monitor 0x40100004 0x5
redpitaya> monitor 0x40100004
0x00000000
redpitaya> monitor 0x4010001c
0x000003d0
redpitaya> monitor 0x40113d34
0x00002990
redpitaya> monitor 0x401131fc
0x000007d3

Have you applied changes to the monitor utility? In your case it looks like there are some restrictions of the memory space...

However, the purpose of the "monitor" utility is accessing few FPGA registers. Reading large buffers would take more time. It's therefore more convenient to modify the acquire utility in order to support acquisitions triggered by signals. Here is the modified code (just acquire_trig.c) and the binary (acquire_trig) to be copied to Red Pitaya /opt/bin/ folder:
https://github.com/BBorut/RedPitaya/tre ... quire_trig

Example of rising and falling edge acquisition:

redpitaya> acquire_trig --trig_pa=100 10 1
94 -65
91 -59
101 -64
98 -64
103 -63
96 -62
105 -58
107 -52
106 -63
117 -65
redpitaya> acquire_trig --trig_na=100 10 1
117 -81
114 -68
98 -70
98 -79
104 -61
98 -71
97 -65
103 -83
95 -66
90 -76
redpitaya>

You can also save the whole buffer to a file:
redpitaya> acquire_trig --trig_pa=100 16384 1 > /tmp/buffer.txt

BBorut
Posts: 2
Joined: Sat Sep 20, 2014 7:16 pm

Re: Simple sampling using PuTTY

Post by BBorut » Sat Sep 20, 2014 7:44 pm

You can still run these utilities through PuTTy and use pscp to copy the files over the network.

kavilshah
Posts: 29
Joined: Thu Nov 27, 2014 5:21 am

Re: Simple sampling using PuTTY

Post by kavilshah » Tue Dec 02, 2014 10:34 am

hi...
Can you please give me hardware setup procedure and procedural code for this same code...
also please provide some photos for this setup....

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 22 guests