Hello,

I have set up a trigger for my X310 using the Pin 2 of the GPIO Front Panel. The Trigger is a TTL signal fed to the Pin. But we experience a jitter of ~100µs between the Trigger and the SDR starting to send data.Is it possible to reduce this latency/ jittering to <10µs. If not is it possible to use e.g. Pin 6 as a trigger output, which signalises when the SDR starts to send data? How would I implement this in the code? This would be interesting to me, since I could then synchronise my experiment to the SDR and not vice versa.

The code we use for setting up the trigger is pretty similar to what is on the ettus knowledge base. The important bits are these:

...

...

...

//Declarate Pin 2 as Trigger Input -> this is used for the triggered mode
#define MAN_GPIO_MASK (1 << 2)
#define AMP_GPIO_MASK (1 << 6)
#define ATR_MASKS (AMP_GPIO_MASK | MAN_GPIO_MASK)
// set up our values for ATR control: 1 for ATR, 0 for manual
#define ATR_CONTROL (AMP_GPIO_MASK & ~MAN_GPIO_MASK)
// set up the GPIO directions: 1 for output, 0 for input
#define GPIO_DDR  (AMP_GPIO_MASK & ~MAN_GPIO_MASK)
....

....

....

usrp->set_gpio_attr("FP0", "CTRL", 0, ATR_MASKS);
        usrp->set_gpio_attr("FP0", "DDR", 0, ATR_MASKS);

        while (true)
                if (0 != usrp->get_gpio_attr("FP0", "READBACK", 0)) {
                    /*here should be Pin 6 or "output trigger" high*/
                    for (int i = 0; i < line; i++) { /*send data to the SDR*/
                        tx_stream->send(
                            buff_ptrs[i], spb, md
                        );
                    }
                   /*here should be Pin 6 or "output trigger" low
            }
        }


Sincerely,

Knut


_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to