From 0400bdb669f6867f89fa0e92a92fb43f7433bf3b Mon Sep 17 00:00:00 2001 From: Jon Kraft Date: Fri, 22 Nov 2024 06:52:44 -0700 Subject: [PATCH] Update CFAR_RADAR_Waterfall_ChirpSync.py Updated to work with Pluto firmware rev 0.39 (and later) --- CFAR_RADAR_Waterfall_ChirpSync.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/CFAR_RADAR_Waterfall_ChirpSync.py b/CFAR_RADAR_Waterfall_ChirpSync.py index d08670b..76f1181 100644 --- a/CFAR_RADAR_Waterfall_ChirpSync.py +++ b/CFAR_RADAR_Waterfall_ChirpSync.py @@ -49,7 +49,7 @@ from target_detection_dbfs import cfar '''This script uses the new Pluto TDD engine As of March 2024, this is in the main branch of https://github.com/analogdevicesinc/pyadi-iio - Also, make sure your Pluto firmware is updated to rev 0.38 (or later) + Also, make sure your Pluto firmware is updated to rev 0.39 (or later) ''' import adi print(adi.__version__) @@ -137,20 +137,24 @@ tdd = adi.tddn(sdr_ip) sdr_pins.gpio_phaser_enable = True tdd.enable = False # disable TDD to configure the registers tdd.sync_external = True -tdd.startup_delay_ms = 1 -tdd.frame_length_ms = ramp_time/1e3 + 1.2 # each chirp is spaced this far apart +tdd.startup_delay_ms = 0 +PRI_ms = ramp_time/1e3 + 1.0 +tdd.frame_length_ms = PRI_ms # each chirp is spaced this far apart num_chirps = 1 tdd.burst_count = num_chirps # number of chirps in one continuous receive buffer tdd.channel[0].enable = True tdd.channel[0].polarity = False -tdd.channel[0].on_ms = 0.01 -tdd.channel[0].off_ms = 0.1 +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_ms = 0.01 -tdd.channel[1].off_ms = 0.1 -tdd.channel[2].enable = 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 # From start of each ramp, how many "good" points do we want?