Skip to content

Commit

Permalink
examples: Add pluto_tddn example
Browse files Browse the repository at this point in the history
Add test example for the Generic TDD Engine using Pluto.
Works with Pluto in Phaser mode.

Signed-off-by: Ionut Podgoreanu <[email protected]>
  • Loading branch information
podgori committed Feb 7, 2024
1 parent 065787b commit c097476
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/pluto_tddn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (C) 2024 Analog Devices, Inc.
#
# SPDX short identifier: ADIBSD

import time

import adi

sdr = adi.Pluto()

# Enable phaser logic in pluto
gpio = adi.one_bit_adc_dac("ip:192.168.2.1")
time.sleep(0.5)
gpio.gpio_phaser_enable = True
time.sleep(0.5)

# Configure TDD properties
tdd = adi.tddn("ip:pluto.local")
tdd.enable = False # make sure the TDD is disabled before changing properties
tdd.frame_length_ms = 4 # each GPIO toggle is spaced 4ms apart
tdd.startup_delay_ms = 0 # do not set a startup delay
tdd.burst_count = 3 # there is a burst of 3 toggles, then off for a long time
tdd.channel[0].on_ms = 0.5 # the first trigger will happen 0.5ms into the buffer
tdd.channel[0].off_ms = 0.6 # each GPIO pulse will be 100us (0.6ms - 0.5ms)
tdd.channel[0].enable = True # enable CH0 output
tdd.sync_external = True # enable external sync trigger
tdd.enable = True # enable TDD engine

0 comments on commit c097476

Please sign in to comment.