How to make DSO with streamer?
Rayman
Posts: 14,768
in Propeller 2
Thinking that the streamer should be good for capturing pin data...
If I'm seeing right, should be able to capture up to 32 pins at full clock speed with one cog.
What I'd like to do is have the streamer continuously capturing data and then stopping at some trigger signal.
Then, want to display data with trigger event in middle of trace. This is the part I don't see how to do...
Now that the streamer is double buffered, seems I can't just stop it at an arbitrary time...
Maybe need to alternate between two input buffers?
I guess there's a new command to get the streamer count. So, I guess I'd read that as soon as the trigger event occurred.
That would be somewhere in the first buffer somewhere, and then I could stop the streamer after the second buffer is full.
But, it could be that I didn't get enough data in that first buffer, pre-trigger...
Maybe I need to rotate between 3 buffers?
Any way to do this with 1 buffer?
If I'm seeing right, should be able to capture up to 32 pins at full clock speed with one cog.
What I'd like to do is have the streamer continuously capturing data and then stopping at some trigger signal.
Then, want to display data with trigger event in middle of trace. This is the part I don't see how to do...
Now that the streamer is double buffered, seems I can't just stop it at an arbitrary time...
Maybe need to alternate between two input buffers?
I guess there's a new command to get the streamer count. So, I guess I'd read that as soon as the trigger event occurred.
That would be somewhere in the first buffer somewhere, and then I could stop the streamer after the second buffer is full.
But, it could be that I didn't get enough data in that first buffer, pre-trigger...
Maybe I need to rotate between 3 buffers?
Any way to do this with 1 buffer?
Comments
Do a 'WRFAST bufferlongs_div_16,bufferstart' to set up fast writing
Do an 'XINIT ##$F000_FFFF,#0' to start capturing INA.
Next, set up a pin-match event.
Wait for the event, then stop the streamer using 'XINIT #0,#0'.
Use the GETPTR instruction to figure out about where you left off in the buffer. Then, back up, checking each sample for the trigger state. It should be several samples back.
Sounds like xinit 0,0 will interrupt and stop steamer
So, just wait for trigger, get ptr, wait a moment to get more samples then stop streamer and process
You mean via smart pins ?
There is also a similar FIFO mode, which would work with the FTDI high speed USB devices.
Some logic analyzers work by time-stamp where a Pin-change loads a counter value, and the Pin-group, as a capture pair.
This slashes the memory needed for Logic capture, and gives large dynamic range zooms.
With counters in the pins, that's probably quite easy to do ?