AnsweredAssumed Answered

Trying to enable fir filter on ad9361 with zc702

Question asked by atg on Nov 11, 2015
Latest reply on Nov 11, 2015 by atg

Hello,

I am trying to set the programmable FIR filter on the ad9361 using the Matlab app AD9361 Filter Design Wizard (MATLAB Filter Design Wizard for AD9361 [Analog Devices Wiki]). I have designed my filter, and loaded the coefficients as so:

root@analog:/sys/bus/iio/devices/iio:device1# filter_coeff.txt > filter_fir_config

When I try to enable the fir filter

echo 1 > in_voltage_filter_fir_en

I get the response: bash: echo: write error: Invalid argument

 

I assume this means there is something wrong with my coefficients, since I loaded the filter coefficients  here: ad9361 device driver trouble as a test, and they loaded fine with no error messages.

Since I used the matlab app, I assumed the coefficients I generated would be valid (or it would warn me) but maybe not. All I really want for my filter is for it to decimate the samples enough so that I can have a sampling rate of ~400ksps coming out of the ad9361, with a passband of ~150khz. I'm not too concerned about what the stop band should be. Below are the filter coefficients that the app generated:

 

# RX [1, 2, 3(both)] GAIN [-12 -6 0 6] DEC [1 2 4]

# TX [1, 2, 3(both)] GAIN [-6 0] INT [1 2 4]

RX 3 GAIN -12 DEC 4

28

-72

-9

-173

-159

-294

-271

-297

-179

-76

99

203

271

209

82

-116

-275

-358

-289

-103

164

391

496

400

128

-242

-557

-687

-538

-146

365

789

940

708

147

-555

-1114

-1277

-915

-115

847

1581

1742

1177

24

-1312

-2288

-2429

-1538

173

2115

3492

3604

2138

-620

-3795

-6127

-6357

-3665

1995

9785

18134

25151

29154

29154

25151

18134

9785

1995

-3665

-6357

-6127

-3795

-620

2138

3604

3492

2115

173

-1538

-2429

-2288

-1312

24

1177

1742

1581

847

-115

-915

-1277

-1114

-555

147

708

940

789

365

-146

-538

-687

-557

-242

128

400

496

391

164

-103

-289

-358

-275

-116

82

209

271

203

99

-76

-179

-297

-271

-294

-159

-173

-9

-72

28

 

Thank you!

Outcomes