Reading and Writing to/from the FPGA

Applications, development tools, FPGA, C, WEB
Post Reply
kokowang
Posts: 17
Joined: Sat Oct 08, 2016 10:02 pm

Reading and Writing to/from the FPGA

Post by kokowang » Fri Aug 18, 2017 7:18 pm

I'm working in oscilloscope of the classic project. I've created a 1 bit trigger to and connected to the system bus connection in red_pitaya_scope.
How would I have the CPU read and store data from a data register when the trigger is tripped, and reset the trigger?
(I'm not familiar with red pitaya's API implementation and am not sure if this is the best way to do this.)

hunterakins
Posts: 6
Joined: Thu Apr 06, 2017 9:31 pm
Location: Berkeley, CA

Re: Reading and Writing to/from the FPGA

Post by hunterakins » Thu Aug 31, 2017 12:05 am

I'm interested in implementing possibly that exact idea.
I want to use a GPIO pin to trigger the acquisition.

Have you made any progress?

What I was thinking was to use the trigger to reset the ADC write pointer, so that after a trigger, if I use the supplied C API to access the samples I will invariably get the samples immediately after the trigger. However, I have yet to start messing with their oscilloscope application (I've been playing around with the more simple examples from Antonin Potocnik http://antonpotocnik.com/?p=519284 .
In his examples, he uses the AXI_GPIO interface between FPGA and processor. That could be suitable to let your c program now that the trigger has occurred and to acquire the samples.

hunterakins
Posts: 6
Joined: Thu Apr 06, 2017 9:31 pm
Location: Berkeley, CA

Re: Reading and Writing to/from the FPGA

Post by hunterakins » Thu Aug 31, 2017 12:13 am

BTW:
There already are built-ins for acquiring from the ADC on a trigger.
Check out https://github.com/RedPitaya/RedPitaya/ ... itaya/rp.h

Search for
rp_AcqSetTriggerSrc

That will allow you to trigger acquisition on either one GPIO pin or the fast analog inputs.

I'm not sure what your final goal is.

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: Google [Bot] and 30 guests