Missing Trigger on low decimation settings - 125-10

Just about everything about Red Pitaya
Post Reply
BeRenz
Posts: 6
Joined: Mon Aug 10, 2020 6:05 pm

Missing Trigger on low decimation settings - 125-10

Post by BeRenz » Sat Aug 15, 2020 1:13 am

Hi all,

while experimenting with:
https://github.com/HrRossi/RedPitaya/tr ... ac_trigger
which enables a trigger input input generated by a overflow of the arbitrary signal generator
and reading this post:
viewtopic.php?f=14&t=1035&start=10
I noticed that the pitaya seems to only trigger 99 out of 100 times with the while loop provided by the example on the red pitaya github repo:

Code: Select all

rp_acq_trig_state_t state = RP_TRIG_STATE_TRIGGERED;
while(1){
    rp_AcqGetTriggerState(&state);
    if(state == RP_TRIG_STATE_TRIGGERED){
        break;
    }
}
.
This problem is only apparent when triggering often, with low Decimation rate DEC_1 to DEC_8 and only if the system's cpu is loaded. This will lead to a hang inside the while loop and will stall the further programm execution, for testing porpuses I hence programmed a deltaTime function which breaks the loop when time waited exeeds a certain value. To make sure this does not cause any side effect the time is selected as 1.0s while the waveform repeats every 0.1s.

A quick fix for this seems to be using

Code: Select all

do{
    rp_AcqGetTriggerSrc(&trgsrc);
}while(trgsrc==RP_TRIG_SRC_AWG_PE);
instead of

Code: Select all

do{
    rp_AcqGetTriggerState(&state);
}while(state!=RP_TRIG_STATE_TRIGGED);
First I wiped an SD-card's visible partition in windows and copyed the version provided by HrRossi onto it which is mandatory to run the example provided.
To reproduce this behavior I have prepared a minimal example of my code where you can change the triggering while loops by commenting line 9 (#define triggerBySrc)->(//#define triggerBySrc), and the problem will appear in the commented version.
Compile with the provided makefile (I had to add .txt file extension to upload it),
then "export LD_LIBRARY_PATH" as usual.
After that start the ./server application and then with another putty-ssh-terminal cause load on the system to get the error faster, I used htop and pressed F-10 to force a refresh.

I know that this bug is found on an old version of the ecosystem (0.94), but since I need the trigger on wavegenerator functionality moving to the lastest version is not an option. I have not tested if this bug also happend on the vanilla image, but I would guess so.

If someone could shine some light on the inner workings of the acq block and the triggering mechanics I would be grateful. Also please let me know if you experienced the same issue.

Best,
Benjamin
You do not have the required permissions to view the files attached to this post.

BeRenz
Posts: 6
Joined: Mon Aug 10, 2020 6:05 pm

Re: Missing Trigger on low decimation settings - 125-10

Post by BeRenz » Wed Aug 19, 2020 11:01 am


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 1 guest