Post Go back to editing

ADALM-PLUTO: Unable to Enable TDDN Engine

Category: Software
Product Number: AD9363
Software Version: v0.38

I am trying to develop a FMCW RADAR using pluto. I want to synchronize Tx and Rx. For that I am using TDD Channel[1] and Channel[2].

I have enabled TDD as explained in this link: WIKI

Here is my code:

import time
import adi 
import numpy as np

# Modulr Init
sdr_ip = "ip:pluto.local"  # "192.168.2.1, or pluto.local"  # IP address of the Transceiver Block
my_sdr = adi.ad9361(uri=sdr_ip) # Pluto Init 
sdr_pins = adi.one_bit_adc_dac(sdr_ip) # Pluto GPIO Pins
tdd = adi.tdd(sdr_ip) # TDD Engine INIT 


sample_rate = fs = 60e6

N = 1024
num_chirps = 256
ts = 1/int(fs)

center_freq= 2.2e9
signal_freq = 3e6

BW = sample_rate/4
slope = BW/(N*ts)

ramp_time_us = 300
ramp_time_ms = ramp_time_us/1e3
ramp_time_s = ramp_time_ms/1e3


# SDR Config
my_sdr.rx_lo = int(center_freq)
my_sdr.rx_enabled_channels = 0   # enable Rx1 and Rx2
my_sdr.tx_lo = int(center_freq)
my_sdr.tx_cyclic_buffer = True
my_sdr.sample_rate = sample_rate
my_sdr.rx_buffer_size = N * num_chirps

# TDD Config
# sdr_pins.gpio_tdd_ext_sync = False # If set to True, this enables external capture triggering using the L24N GPIO on the Pluto.  When set to false, an internal trigger pulse will be generated every second

tdd.enable = False         # disable TDD to configure the registers
tdd.sync_external = False
tdd.startup_delay_ms = 0
PRI_ms = ramp_time_ms
tdd.frame_length_ms = PRI_ms    # each chirp is spaced this far apart
tdd.burst_count = num_chirps       # number of chirps in one continuous receive buffer

tdd.channel[0].enable = False
tdd.channel[0].polarity = False
tdd.channel[0].on_raw = 0
tdd.channel[0].off_raw = 10
tdd.channel[1].enable = True
tdd.channel[1].polarity = False
tdd.channel[1].on_raw = 0
tdd.channel[1].off_raw = 10
tdd.channel[2].enable = True
tdd.channel[2].polarity = False
tdd.channel[2].on_raw = 0
tdd.channel[2].off_raw = 10
tdd.enable = True


# Generate Signal
t = np.linspace(0, N*ts, ts)
fc = int(signal_freq * fs/N)* N/fs

i = (2**14) * np.cos(2 * np.pi * fc * t) # A cos(2PiFt)
q = (2**14) * np.sin(2 * np.pi * fc * t) # A sin(2PiFt)

iq = i + 1j * q # Complex N

my_sdr.tx(iq)


while True:
    data = my_sdr.rx()
    print(len(data))


I am getting following errors:

Exception: No device found for one-bit-adc-dac  


 If I comment 

sdr_pins = adi.one_bit_adc_dac(sdr_ip) # Pluto GPIO Pins


I get ,

File "/home/zebu/pluto_tests/test.py", line 9, in <module>
tdd = adi.tddn(sdr_ip) # TDD Engine INIT
File "/usr/local/lib/python3.10/dist-packages/adi/tddn.py", line 23, in __init__
for ch in self._ctrl.channels:
AttributeError: 'NoneType' object has no attribute 'channels'
Parents Reply Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.