Post Go back to editing

Setting AD9371 for 80MHz sampling clk

Hello All,

I’m using AD9371 for advanced Wi-Fi prototyping. Hence I had to change 122.88MHz VCXO on evaluation board to 80MHz so I can achieve integer multiples of 20MHz sampling required for 802.11 signal processing.

By  doing so, I discover a number of issues, particularly with initial calibration routine in AD9371 firmware and driver. Below are details of my discovery and workaround I find to make it work. Could you please review it and subject the better way to make AD9371 work for 80MHz sampling clk, Thanks, Mikhail.

Here are details:

1.By enabling  ad9371 evaluation board to run at 80MHz clk I discover a multiple issues with Filter Designer for AD9371, AD9371 calibration firmware routine and a driver. While I found a workaround, we asking to address this issue as it preventing us to use AD9371 in normal operation mode.

2.Attached are word document and supporting files (.m file, profile & .dts) with necessary information to make ad9371 work 80MHz clk so I&Q sampling rate is integer multiplier of 20MHz (as it used for 802.11/WI-FI).

<profile AD9371 version=0 name=Rx 40, IQrate 80.000>
 <clocks>
  <deviceClock_kHz=320000>
  <clkPllVcoFreq_kHz=9600000>
  <clkPllVcoDiv=3>
  <clkPllHsDiv=4>
 </clocks>

 <rx>
  <adcDiv=1>
  <rxFirDecimation=2>
  <rxDec5Decimation=5>
  <enHighRejDec5=1>
  <rhb1Decimation=1>
  <iqRate_kHz=80000>
  <rfBandwidth_Hz=40000000>
  <rxBbf3dBCorner_kHz=40000>

  <filter FIR gain=-6 num=48>
  1
  7
  3
  -20
  -38
  10
  107
  100
  -122
  -334
  -113
  506
  718
  -166
  -1391
  -1095
  1231
  3033
  981
  -4224
  -6482
  219
  14325
  26107
  26107
  14325
  219
  -6482
  -4224
  981
  3033
  1231
  -1095
  -1391
  -166
  718
  506
  -113
  -334
  -122
  100
  107
  10
  -38
  -20
  3
  7
  1
  </filter>

  <adc-profile num=16>
  900
  559
  201
  98
  1280
  199
  1522
  98
  860
  25
  529
  37
  48
  26
  15
  196
  </adc-profile>
 </rx>

 <obs>
  <adcDiv=1>
  <rxFirDecimation=2>
  <rxDec5Decimation=5>
  <enHighRejDec5=1>
  <rhb1Decimation=1>
  <iqRate_kHz=80000>
  <rfBandwidth_Hz=40000000>
  <rxBbf3dBCorner_kHz=20000>

  <filter FIR gain=-6 num=48>
  -1
  10
  10
  -22
  -60
  -6
  143
  171
  -129
  -485
  -245
  660
  1099
  -74
  -1954
  -1784
  1506
  4443
  1920
  -5737
  -10210
  -2631
  15550
  31189
  31189
  15550
  -2631
  -10210
  -5737
  1920
  4443
  1506
  -1784
  -1954
  -74
  1099
  660
  -245
  -485
  -129
  171
  143
  -6
  -60
  -22
  10
  10
  -1
  </filter>

  <adc-profile num=16>
  900
  559
  201
  98
  1280
  199
  1522
  98
  860
  25
  529
  37
  48
  26
  15
  196
  </adc-profile>

  <lpbk-adc-profile num=16>
  922
  550
  201
  98
  1280
  112
  1505
  53
  864
  14
  533
  40
  48
  26
  15
  197
  </lpbk-adc-profile>
 </obs>

 <sniffer>
  <adcDiv=1>
  <rxFirDecimation=2>
  <rxDec5Decimation=5>
  <enHighRejDec5=1>
  <rhb1Decimation=2>
  <iqRate_kHz=40000>
  <rfBandwidth_Hz=20000000>
  <rxBbf3dBCorner_kHz=20000>

  <filter FIR gain=-6 num=72>
  -9
  12
  18
  17
  -17
  -49
  -45
  21
  99
  105
  -11
  -171
  -215
  -36
  258
  390
  149
  -343
  -648
  -371
  394
  1003
  763
  -357
  -1476
  -1425
  138
  2113
  2589
  489
  -3082
  -5079
  -2537
  4990
  14500
  21095
  21095
  14500
  4990
  -2537
  -5079
  -3082
  489
  2589
  2113
  138
  -1425
  -1476
  -357
  763
  1003
  394
  -371
  -648
  -343
  149
  390
  258
  -36
  -215
  -171
  -11
  105
  99
  21
  -45
  -49
  -17
  17
  18
  12
  -9
  </filter>

  <adc-profile num=16>
  922
  550
  201
  98
  1280
  112
  1505
  53
  864
  14
  533
  40
  48
  26
  15
  197
  </adc-profile>
 </sniffer>

 <tx>
  <dacDiv=2.5>
  <txFirInterpolation=1>
  <thb1Interpolation=2>
  <thb2Interpolation=2>
  <txInputHbInterpolation=1>
  <iqRate_kHz=80000>
  <primarySigBandwidth_Hz=20000000>
  <rfBandwidth_Hz=40000000>
  <txDac3dBCorner_kHz=92000>
  <txBbf3dBCorner_kHz=20000>

  <filter FIR gain=6 num=16>
  26
  -292
  -75
  333
  339
  -659
  -2192
  21034
  -2192
  -659
  339
  333
  -75
  -292
  26
  0
  </filter>
 </tx>
</profile>

DOCX

3.The main issue addressed by outlined work around:

3.1. Even with correct modification to Linux Device Tree, initial initialization of AD9371 at boot up is failing due to a time out of driver waiting for calibration routine execution in AD9371 firmware.

[    3.560034] random: crng init done

[   84.532030] ERROR: 283: MYKONOS_waitInitCals() returned an ARM error

[   84.557234] ERROR: 258: Device not in radioOff/IDLE state. Error in MYKONOS_enableTrackingCals()

[   84.591936] ERROR: 364: MYKONOS_waitArmCmdStatus() exited due to ARM error for the desired ARM opcode

[   84.601111] ERROR: 145: ARM command to move to radioOn state failed.

[   84.608698] ERROR: 364: MYKONOS_waitArmCmdStatus() exited due to ARM error for the desired ARM opcode

[   84.617880] ERROR: 257: ARM Command Error in MYKONOS_setObsRxPathSource()

3.2. It was discovered that if TX_QEC_INIT calibration flag is disabled, Driver is not failing anymore. TX is operate fine after that but RX still not working. 

% Dis TX_QEC_INIT Calibration using command line

cd /sys/kernel/debug/iio/iio:device1

echo 31231 > /sys/kernel/debug/iio/iio:device1/adi,default-initial-calibrations-mask

echo 1 > /sys/kernel/debug/iio/iio:device1/initialize

3.3. It was discovered that the profile, exactly the same as AD9371 configuration in Linux Device Tree has to be reload as the net step to make RX chain working (the MATLAB script is used).

h = intelsoc;

ProfileFile = 'ad9371_80MHz_profileMTG.txt';

h.putFile(ProfileFile,'/tmp') % FTP the configuration file over

ProfileConfigLocation = h.system('ls /sys/bus/iio/devices/iio:device*/*profile_config*');

ProfileConfigWrite = sprintf('cat /tmp/%s > %s',ProfileFile,ProfileConfigLocation);

msg = h.system(ProfileConfigWrite);

Parents
  • Here is .m file I sed to automate a setup (disabling TX_QEC_INIT Calibration & loading profile)

  • The first problem that needs to get addressed is the profile generation issue.

    Modifying or fixing a profile by hand is a bad idea, there might be some constrains that are not met and thus the profile is generated the way it is.

    Of course in case it's obviously buggy, fixing it does not mean it must work the way it's being modified.

    The next issue is the failing TX QEC INIT calibration, which can be a result of an invalid profile.

    Have you tried using a device clock of 80 MHz ?

    Can you attach your modified devicetree dts?

    I'll move this thread to the AD9371 design support forum for further inputs on the filter designer issue.

    -Michael

     

  • My sampling rate is 80Msps, but device clock is 320MHz (80MHz *4). It is because JESD links do not “like” sampling rate the same as device clock and work much better at device clock multiple of sampling rate.

    (but calibration is failing at 80MHz device clk as well)

  • Tx QEC can fail if matching is not correct or if you are using a very large Tx attenuation setting. Since you are using Eval board matching should be Ok.

    As Michael mentioned , you should use the profile wizard to create custom profile which matches your sampling rate requirement. 

  • I generate a profile using Filter Wiz. For 80Msps (see setting on .jpg image)

    If I load this profile, I get following error (which is correct, this settings are not supported by AD9371 PLL).

     

    socfpga> [  416.515536] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  416.524130] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  416.532721] ad9371 spi32766.1: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  416.532721]  (64)
    [  417.865480] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  417.874067] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  417.882658] ad9371 spi32766.1: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  417.882658]  (64)
    [  417.894342] ------------[ cut here ]------------
    [  417.898954] WARNING: CPU: 0 PID: 911 at drivers/clk/clk.c:622 clk_core_disable+0xb0/0x194
    [  417.907091] Modules linked in: mwipcore mwipcore_iio_streaming mwipcore_iio_mm mwipcore_dma_streaming mathworks_ip_common
    [  417.918070] CPU: 0 PID: 911 Comm: cat Not tainted 4.9.0 #2
    [  417.923528] Hardware name: Altera SOCFPGA Arria10
    [  417.928226] [<c01110e0>] (unwind_backtrace) from [<c010caec>] (show_stack+0x20/0x24)
    [  417.935940] [<c010caec>] (show_stack) from [<c03e839c>] (dump_stack+0x98/0xac)
    [  417.943133] [<c03e839c>] (dump_stack) from [<c011fe50>] (__warn+0xf8/0x110)
    [  417.950066] [<c011fe50>] (__warn) from [<c011ff38>] (warn_slowpath_null+0x30/0x38)
    [  417.957603] [<c011ff38>] (warn_slowpath_null) from [<c0429bec>] (clk_core_disable+0xb0/0x194)
    [  417.966092] [<c0429bec>] (clk_core_disable) from [<c0429f94>] (clk_core_disable_lock+0x28/0x34)
    [  417.974751] [<c0429f94>] (clk_core_disable_lock) from [<c0429fcc>] (clk_disable+0x2c/0x30)
    [  417.982981] [<c0429fcc>] (clk_disable) from [<c059cbd0>] (ad9371_profile_bin_write+0x29c/0x17c0)
    [  417.991733] [<c059cbd0>] (ad9371_profile_bin_write) from [<c02a6fa4>] (sysfs_kf_bin_write+0x84/0x9c)
    [  418.000827] [<c02a6fa4>] (sysfs_kf_bin_write) from [<c02a6668>] (kernfs_fop_write+0x104/0x208)
    [  418.009403] [<c02a6668>] (kernfs_fop_write) from [<c02385c8>] (__vfs_write+0x38/0x128)
    [  418.017288] [<c02385c8>] (__vfs_write) from [<c0239454>] (vfs_write+0xb4/0x178)
    [  418.024566] [<c0239454>] (vfs_write) from [<c023a26c>] (SyS_write+0x4c/0xa0)
    [  418.031586] [<c023a26c>] (SyS_write) from [<c0108080>] (ret_fast_syscall+0x0/0x3c)
    [  418.039118] ---[ end trace 28be9184bed701b5 ]---
    [  418.043750] ------------[ cut here ]------------
    [  418.048361] WARNING: CPU: 0 PID: 911 at drivers/clk/clk.c:504 clk_core_unprepare+0xbc/0x1a4
    [  418.056704] Modules linked in: mwipcore mwipcore_iio_streaming mwipcore_iio_mm mwipcore_dma_streaming mathworks_ip_common
    [  418.067700] CPU: 0 PID: 911 Comm: cat Tainted: G        W       4.9.0 #2
    [  418.074367] Hardware name: Altera SOCFPGA Arria10
    [  418.079061] [<c01110e0>] (unwind_backtrace) from [<c010caec>] (show_stack+0x20/0x24)
    [  418.086774] [<c010caec>] (show_stack) from [<c03e839c>] (dump_stack+0x98/0xac)
    [  418.093966] [<c03e839c>] (dump_stack) from [<c011fe50>] (__warn+0xf8/0x110)
    [  418.100897] [<c011fe50>] (__warn) from [<c011ff38>] (warn_slowpath_null+0x30/0x38)
    [  418.108434] [<c011ff38>] (warn_slowpath_null) from [<c04298d0>] (clk_core_unprepare+0xbc/0x1a4)
    [  418.117094] [<c04298d0>] (clk_core_unprepare) from [<c042ab10>] (clk_unprepare+0x34/0x3c)
    [  418.125238] [<c042ab10>] (clk_unprepare) from [<c059cbd8>] (ad9371_profile_bin_write+0x2a4/0x17c0)
    [  418.134160] [<c059cbd8>] (ad9371_profile_bin_write) from [<c02a6fa4>] (sysfs_kf_bin_write+0x84/0x9c)
    [  418.143254] [<c02a6fa4>] (sysfs_kf_bin_write) from [<c02a6668>] (kernfs_fop_write+0x104/0x208)
    [  418.151829] [<c02a6668>] (kernfs_fop_write) from [<c02385c8>] (__vfs_write+0x38/0x128)
    [  418.159714] [<c02385c8>] (__vfs_write) from [<c0239454>] (vfs_write+0xb4/0x178)
    [  418.166992] [<c0239454>] (vfs_write) from [<c023a26c>] (SyS_write+0x4c/0xa0)
    [  418.174013] [<c023a26c>] (SyS_write) from [<c0108080>] (ret_fast_syscall+0x0/0x3c)
    [  418.181599] ---[ end trace 28be9184bed701b6 ]---
    [  418.186205] ------------[ cut here ]------------
    [  418.190808] WARNING: CPU: 0 PID: 911 at drivers/clk/clk.c:622 clk_core_disable+0xb0/0x194
    [  418.198943] Modules linked in: mwipcore mwipcore_iio_streaming mwipcore_iio_mm mwipcore_dma_streaming mathworks_ip_common
    [  418.209916] CPU: 0 PID: 911 Comm: cat Tainted: G        W       4.9.0 #2
    [  418.216582] Hardware name: Altera SOCFPGA Arria10
    [  418.221271] [<c01110e0>] (unwind_backtrace) from [<c010caec>] (show_stack+0x20/0x24)
    [  418.228981] [<c010caec>] (show_stack) from [<c03e839c>] (dump_stack+0x98/0xac)
    [  418.236172] [<c03e839c>] (dump_stack) from [<c011fe50>] (__warn+0xf8/0x110)
    [  418.243102] [<c011fe50>] (__warn) from [<c011ff38>] (warn_slowpath_null+0x30/0x38)
    [  418.250638] [<c011ff38>] (warn_slowpath_null) from [<c0429bec>] (clk_core_disable+0xb0/0x194)
    [  418.259125] [<c0429bec>] (clk_core_disable) from [<c0429f94>] (clk_core_disable_lock+0x28/0x34)
    [  418.267784] [<c0429f94>] (clk_core_disable_lock) from [<c0429fcc>] (clk_disable+0x2c/0x30)
    [  418.276012] [<c0429fcc>] (clk_disable) from [<c059cbe4>] (ad9371_profile_bin_write+0x2b0/0x17c0)
    [  418.284760] [<c059cbe4>] (ad9371_profile_bin_write) from [<c02a6fa4>] (sysfs_kf_bin_write+0x84/0x9c)
    [  418.293852] [<c02a6fa4>] (sysfs_kf_bin_write) from [<c02a6668>] (kernfs_fop_write+0x104/0x208)
    [  418.302427] [<c02a6668>] (kernfs_fop_write) from [<c02385c8>] (__vfs_write+0x38/0x128)
    [  418.310309] [<c02385c8>] (__vfs_write) from [<c0239454>] (vfs_write+0xb4/0x178)
    [  418.317586] [<c0239454>] (vfs_write) from [<c023a26c>] (SyS_write+0x4c/0xa0)
    [  418.324605] [<c023a26c>] (SyS_write) from [<c0108080>] (ret_fast_syscall+0x0/0x3c)
    [  418.332136] ---[ end trace 28be9184bed701b7 ]---
    [  418.336754] ------------[ cut here ]------------
    [  418.341358] WARNING: CPU: 0 PID: 911 at drivers/clk/clk.c:504 clk_core_unprepare+0xbc/0x1a4
    [  418.349680] Modules linked in: mwipcore mwipcore_iio_streaming mwipcore_iio_mm mwipcore_dma_streaming mathworks_ip_common
    [  418.360665] CPU: 0 PID: 911 Comm: cat Tainted: G        W       4.9.0 #2
    [  418.367332] Hardware name: Altera SOCFPGA Arria10
    [  418.372020] [<c01110e0>] (unwind_backtrace) from [<c010caec>] (show_stack+0x20/0x24)
    [  418.379730] [<c010caec>] (show_stack) from [<c03e839c>] (dump_stack+0x98/0xac)
    [  418.386920] [<c03e839c>] (dump_stack) from [<c011fe50>] (__warn+0xf8/0x110)
    [  418.393851] [<c011fe50>] (__warn) from [<c011ff38>] (warn_slowpath_null+0x30/0x38)
    [  418.401387] [<c011ff38>] (warn_slowpath_null) from [<c04298d0>] (clk_core_unprepare+0xbc/0x1a4)
    [  418.410047] [<c04298d0>] (clk_core_unprepare) from [<c042ab10>] (clk_unprepare+0x34/0x3c)
    [  418.418189] [<c042ab10>] (clk_unprepare) from [<c059cbec>] (ad9371_profile_bin_write+0x2b8/0x17c0)
    [  418.427109] [<c059cbec>] (ad9371_profile_bin_write) from [<c02a6fa4>] (sysfs_kf_bin_write+0x84/0x9c)
    [  418.436199] [<c02a6fa4>] (sysfs_kf_bin_write) from [<c02a6668>] (kernfs_fop_write+0x104/0x208)
    [  418.444774] [<c02a6668>] (kernfs_fop_write) from [<c02385c8>] (__vfs_write+0x38/0x128)
    [  418.452657] [<c02385c8>] (__vfs_write) from [<c0239454>] (vfs_write+0xb4/0x178)
    [  418.459935] [<c0239454>] (vfs_write) from [<c023a26c>] (SyS_write+0x4c/0xa0)
    [  418.466954] [<c023a26c>] (SyS_write) from [<c0108080>] (ret_fast_syscall+0x0/0x3c)
    [  418.474502] ---[ end trace 28be9184bed701b8 ]---
    [  418.479102] ------------[ cut here ]------------
    [  418.483703] WARNING: CPU: 0 PID: 911 at drivers/clk/clk.c:622 clk_core_disable+0xb0/0x194
    [  418.491839] Modules linked in: mwipcore mwipcore_iio_streaming mwipcore_iio_mm mwipcore_dma_streaming mathworks_ip_common
    [  418.502809] CPU: 0 PID: 911 Comm: cat Tainted: G        W       4.9.0 #2
    [  418.509476] Hardware name: Altera SOCFPGA Arria10
    [  418.514162] [<c01110e0>] (unwind_backtrace) from [<c010caec>] (show_stack+0x20/0x24)
    [  418.521871] [<c010caec>] (show_stack) from [<c03e839c>] (dump_stack+0x98/0xac)
    [  418.529062] [<c03e839c>] (dump_stack) from [<c011fe50>] (__warn+0xf8/0x110)
    [  418.535992] [<c011fe50>] (__warn) from [<c011ff38>] (warn_slowpath_null+0x30/0x38)
    [  418.543528] [<c011ff38>] (warn_slowpath_null) from [<c0429bec>] (clk_core_disable+0xb0/0x194)
    [  418.552014] [<c0429bec>] (clk_core_disable) from [<c0429f94>] (clk_core_disable_lock+0x28/0x34)
    [  418.560673] [<c0429f94>] (clk_core_disable_lock) from [<c0429fcc>] (clk_disable+0x2c/0x30)
    [  418.568901] [<c0429fcc>] (clk_disable) from [<c059cbf8>] (ad9371_profile_bin_write+0x2c4/0x17c0)
    [  418.577649] [<c059cbf8>] (ad9371_profile_bin_write) from [<c02a6fa4>] (sysfs_kf_bin_write+0x84/0x9c)
    [  418.586741] [<c02a6fa4>] (sysfs_kf_bin_write) from [<c02a6668>] (kernfs_fop_write+0x104/0x208)
    [  418.595316] [<c02a6668>] (kernfs_fop_write) from [<c02385c8>] (__vfs_write+0x38/0x128)
    [  418.603199] [<c02385c8>] (__vfs_write) from [<c0239454>] (vfs_write+0xb4/0x178)
    [  418.610475] [<c0239454>] (vfs_write) from [<c023a26c>] (SyS_write+0x4c/0xa0)
    [  418.617494] [<c023a26c>] (SyS_write) from [<c0108080>] (ret_fast_syscall+0x0/0x3c)
    [  418.625027] ---[ end trace 28be9184bed701b9 ]---
    [  418.629635] ------------[ cut here ]------------
    [  418.634250] WARNING: CPU: 0 PID: 911 at drivers/clk/clk.c:504 clk_core_unprepare+0xbc/0x1a4
    [  418.642568] Modules linked in: mwipcore mwipcore_iio_streaming mwipcore_iio_mm mwipcore_dma_streaming mathworks_ip_common
    [  418.653549] CPU: 0 PID: 911 Comm: cat Tainted: G        W       4.9.0 #2
    [  418.660217] Hardware name: Altera SOCFPGA Arria10
    [  418.664904] [<c01110e0>] (unwind_backtrace) from [<c010caec>] (show_stack+0x20/0x24)
    [  418.672613] [<c010caec>] (show_stack) from [<c03e839c>] (dump_stack+0x98/0xac)
    [  418.679803] [<c03e839c>] (dump_stack) from [<c011fe50>] (__warn+0xf8/0x110)
    [  418.686733] [<c011fe50>] (__warn) from [<c011ff38>] (warn_slowpath_null+0x30/0x38)
    [  418.694271] [<c011ff38>] (warn_slowpath_null) from [<c04298d0>] (clk_core_unprepare+0xbc/0x1a4)
    [  418.702930] [<c04298d0>] (clk_core_unprepare) from [<c042ab10>] (clk_unprepare+0x34/0x3c)
    [  418.711072] [<c042ab10>] (clk_unprepare) from [<c059cc00>] (ad9371_profile_bin_write+0x2cc/0x17c0)
    [  418.719992] [<c059cc00>] (ad9371_profile_bin_write) from [<c02a6fa4>] (sysfs_kf_bin_write+0x84/0x9c)
    [  418.729084] [<c02a6fa4>] (sysfs_kf_bin_write) from [<c02a6668>] (kernfs_fop_write+0x104/0x208)
    [  418.737659] [<c02a6668>] (kernfs_fop_write) from [<c02385c8>] (__vfs_write+0x38/0x128)
    [  418.745542] [<c02385c8>] (__vfs_write) from [<c0239454>] (vfs_write+0xb4/0x178)
    [  418.752818] [<c0239454>] (vfs_write) from [<c023a26c>] (SyS_write+0x4c/0xa0)
    [  418.759838] [<c023a26c>] (SyS_write) from [<c0108080>] (ret_fast_syscall+0x0/0x3c)
    [  418.767401] ---[ end trace 28be9184bed701ba ]---
    [  420.095650] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  420.104241] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  420.112833] ad9371 spi32766.1: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  420.112833]  (64)
    [  421.445844] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  421.454430] ERROR: 64: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  421.463021] ad9371 spi32766.1: CLKPLL VCO frequency exceeded max(9.216Ghz) in VCO divider /1.5 case ()
    [  421.463021]  (64)
    

    Nevertheless, if I use the other (second) pair for coefficients (Filter Wiz pick up ONLY the first pair), it works fine (see the other profile). That was an exact fix to .m file for Filter Wiz I have implemented.

    <profile AD9371 version=0 name=Rx 40, IQrate 80.000>
     <clocks>
      <deviceClock_kHz=320000>
      <clkPllVcoFreq_kHz=9600000>
      <clkPllVcoDiv=1.5>
      <clkPllHsDiv=4>
     </clocks>
    
     <rx>
      <adcDiv=1>
      <rxFirDecimation=2>
      <rxDec5Decimation=5>
      <enHighRejDec5=1>
      <rhb1Decimation=2>
      <iqRate_kHz=80000>
      <rfBandwidth_Hz=40000000>
      <rxBbf3dBCorner_kHz=40000>
    
      <filter FIR gain=-6 num=72>
      -9
      12
      18
      17
      -17
      -49
      -45
      21
      99
      105
      -11
      -171
      -215
      -36
      258
      390
      149
      -343
      -648
      -371
      394
      1003
      763
      -357
      -1476
      -1425
      138
      2113
      2589
      489
      -3082
      -5079
      -2537
      4990
      14500
      21095
      21095
      14500
      4990
      -2537
      -5079
      -3082
      489
      2589
      2113
      138
      -1425
      -1476
      -357
      763
      1003
      394
      -371
      -648
      -343
      149
      390
      258
      -36
      -215
      -171
      -11
      105
      99
      21
      -45
      -49
      -17
      17
      18
      12
      -9
      </filter>
    
      <adc-profile num=16>
      460
      273
      182
      98
      1280
      112
      1505
      53
      1574
      25
      1069
      40
      48
      48
      31
      184
      </adc-profile>
     </rx>
    
     <obs>
      <adcDiv=1>
      <rxFirDecimation=2>
      <rxDec5Decimation=5>
      <enHighRejDec5=1>
      <rhb1Decimation=2>
      <iqRate_kHz=80000>
      <rfBandwidth_Hz=40000000>
      <rxBbf3dBCorner_kHz=20000>
    
      <filter FIR gain=-6 num=72>
      -18
      15
      27
      32
      -16
      -69
      -77
      14
      137
      167
      13
      -229
      -325
      -95
      336
      572
      273
      -432
      -928
      -606
      470
      1411
      1178
      -369
      -2041
      -2133
      -21
      2861
      3799
      1074
      -4039
      -7463
      -5019
      4166
      16265
      24784
      24784
      16265
      4166
      -5019
      -7463
      -4039
      1074
      3799
      2861
      -21
      -2133
      -2041
      -369
      1178
      1411
      470
      -606
      -928
      -432
      273
      572
      336
      -95
      -325
      -229
      13
      167
      137
      14
      -77
      -69
      -16
      32
      27
      15
      -18
      </filter>
    
      <adc-profile num=16>
      460
      273
      182
      98
      1280
      112
      1505
      53
      1574
      25
      1069
      40
      48
      48
      31
      184
      </adc-profile>
    
      <lpbk-adc-profile num=16>
      460
      273
      182
      98
      1280
      112
      1505
      53
      1574
      25
      1069
      40
      48
      48
      31
      184
      </lpbk-adc-profile>
     </obs>
    
     <tx>
      <dacDiv=2.5>
      <txFirInterpolation=2>
      <thb1Interpolation=2>
      <thb2Interpolation=2>
      <txInputHbInterpolation=1>
      <iqRate_kHz=80000>
      <primarySigBandwidth_Hz=20000000>
      <rfBandwidth_Hz=40000000>
      <txDac3dBCorner_kHz=92000>
      <txBbf3dBCorner_kHz=20000>
    
      <filter FIR gain=0 num=32>
      -4
      2
      37
      -6
      -183
      -34
      603
      261
      -1596
      -1164
      3511
      4466
      -4555
      -10628
      2571
      23092
      23092
      2571
      -10628
      -4555
      4466
      3511
      -1164
      -1596
      261
      603
      -34
      -183
      -6
      37
      2
      -4
      </filter>
     </tx>
    </profile>
    

    <profile AD9371 version=0 name=Rx 40, IQrate 80.000>
     <clocks>
      <deviceClock_kHz=320000>
      <clkPllVcoFreq_kHz=9600000>
      <clkPllVcoDiv=3>
      <clkPllHsDiv=4>
     </clocks>
    
     <rx>
      <adcDiv=1>
      <rxFirDecimation=2>
      <rxDec5Decimation=5>
      <enHighRejDec5=1>
      <rhb1Decimation=1>
      <iqRate_kHz=80000>
      <rfBandwidth_Hz=40000000>
      <rxBbf3dBCorner_kHz=40000>
    
      <filter FIR gain=-6 num=48>
      1
      7
      3
      -20
      -38
      10
      107
      100
      -122
      -334
      -113
      506
      718
      -166
      -1391
      -1095
      1231
      3033
      981
      -4224
      -6482
      219
      14325
      26107
      26107
      14325
      219
      -6482
      -4224
      981
      3033
      1231
      -1095
      -1391
      -166
      718
      506
      -113
      -334
      -122
      100
      107
      10
      -38
      -20
      3
      7
      1
      </filter>
    
      <adc-profile num=16>
      900
      559
      201
      98
      1280
      199
      1522
      98
      860
      25
      529
      37
      48
      26
      15
      196
      </adc-profile>
     </rx>
    
     <obs>
      <adcDiv=1>
      <rxFirDecimation=2>
      <rxDec5Decimation=5>
      <enHighRejDec5=1>
      <rhb1Decimation=1>
      <iqRate_kHz=80000>
      <rfBandwidth_Hz=40000000>
      <rxBbf3dBCorner_kHz=20000>
    
      <filter FIR gain=-6 num=48>
      -1
      10
      10
      -22
      -60
      -6
      143
      171
      -129
      -485
      -245
      660
      1099
      -74
      -1954
      -1784
      1506
      4443
      1920
      -5737
      -10210
      -2631
      15550
      31189
      31189
      15550
      -2631
      -10210
      -5737
      1920
      4443
      1506
      -1784
      -1954
      -74
      1099
      660
      -245
      -485
      -129
      171
      143
      -6
      -60
      -22
      10
      10
      -1
      </filter>
    
      <adc-profile num=16>
      900
      559
      201
      98
      1280
      199
      1522
      98
      860
      25
      529
      37
      48
      26
      15
      196
      </adc-profile>
    
      <lpbk-adc-profile num=16>
      922
      550
      201
      98
      1280
      112
      1505
      53
      864
      14
      533
      40
      48
      26
      15
      197
      </lpbk-adc-profile>
     </obs>
    
     <sniffer>
      <adcDiv=1>
      <rxFirDecimation=2>
      <rxDec5Decimation=5>
      <enHighRejDec5=1>
      <rhb1Decimation=2>
      <iqRate_kHz=40000>
      <rfBandwidth_Hz=20000000>
      <rxBbf3dBCorner_kHz=20000>
    
      <filter FIR gain=-6 num=72>
      -9
      12
      18
      17
      -17
      -49
      -45
      21
      99
      105
      -11
      -171
      -215
      -36
      258
      390
      149
      -343
      -648
      -371
      394
      1003
      763
      -357
      -1476
      -1425
      138
      2113
      2589
      489
      -3082
      -5079
      -2537
      4990
      14500
      21095
      21095
      14500
      4990
      -2537
      -5079
      -3082
      489
      2589
      2113
      138
      -1425
      -1476
      -357
      763
      1003
      394
      -371
      -648
      -343
      149
      390
      258
      -36
      -215
      -171
      -11
      105
      99
      21
      -45
      -49
      -17
      17
      18
      12
      -9
      </filter>
    
      <adc-profile num=16>
      922
      550
      201
      98
      1280
      112
      1505
      53
      864
      14
      533
      40
      48
      26
      15
      197
      </adc-profile>
     </sniffer>
    
     <tx>
      <dacDiv=2.5>
      <txFirInterpolation=1>
      <thb1Interpolation=2>
      <thb2Interpolation=2>
      <txInputHbInterpolation=1>
      <iqRate_kHz=80000>
      <primarySigBandwidth_Hz=20000000>
      <rfBandwidth_Hz=40000000>
      <txDac3dBCorner_kHz=92000>
      <txBbf3dBCorner_kHz=20000>
    
      <filter FIR gain=6 num=16>
      26
      -292
      -75
      333
      339
      -659
      -2192
      21034
      -2192
      -659
      339
      333
      -75
      -292
      26
      0
      </filter>
     </tx>
    </profile>
    

  • It been a week since my last post, I just want to ping to see where we going.

    Main equation is why driver is failing at initial calibration of TX and how to avoid it.

     (otherwise I have to wait for 60 sec for calibration time out)

    Many thanks in advance.

  • Sorry for the delay in response.

    How are you generating the second profile which you have attached? There are differences in the hb1 decimation and the clkpll vco divider. If you are changing the decimation values manually then the sample rate will also change which will lead to error.Please use the filter wizard for generating custom profile and without any manual change to it load that profile in the GUI.

    Hope you are giving a proper reference clock corresponding to VCXO of 80MHz and dev clock of 80Mhz

    Please use the AD9528 GUI for better understanding which can be downloaded from the below link:

    https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-AD9528.html#eb-relatedsoftware

  • Perhaps it is better to get one step back. As I wrote in the begging of previous email @Jan 23:

    "I generate a profile using Filter Wiz. For 80Msps (see setting on .jpg image)

    If I load this profile, I get following error (which is correct, this settings are not supported by AD9371 PLL)."

    Hence, what you are sking, "Please use the filter wizard for generating custom profile and without any manual change to it load that profile in the GUI", is alredy done and does not work.

    So, without contaminating this result with my fixes, could you tell me why a custom profile generated with the filter wizard is given an error? All settings for custom profile and generated file are included in my post on Jan 23.

    Note that I provide a proper device clk (320MHz) from AD9528 by modifying setting in dts file and verified a clock frequency using scope.

  • Hello,

     

    Just want to ping regarding you answer to my last post, would you be able to help?

    As a brief re-cap, I generate a profile for 80MHz sampling rate using Filter Wizard (device clk is already adjusted and verified) but it is not valid when I load it to the board.

     

    Thanks in advance for your help,

    Mikhail

  • Sorry for delay in response. We were debugging this internally and hence it took some time.

    There is an issue with the profile generator as well as the software for the 80MHz profile specially with a  clkpll vco divider setting of 1.5.

    You can generate the same profile and  load it but with a clkPLL VCO divider value of 3 instead of 1.5 and then program it.You are already doing that with your own fixes.So you can use that and for 1.5 we have reported the issue with design team and it may take some time for a fix.

  • Hello,

     

    Thank you for your response and clarifications – very much appreciated.

    Yes, I was doing exactly what your subjected (generate a profile with a clkPLL VCO divider value of 3).

    Using this profile settings, I modify .dts file (it was included in the post earlier), but driver is failing TX QEC INIT calibration after time out of 60 sec. (if I disable TX QEC INIT calibration and load the same profile after that everything works fine)

     

    Could you subject the next steps to resolve issue with TX QEC INIT calibration?

     

    Thanks in advance,

    Mikhail

  • Yes we are also seeing the same issue.  TXQEC init cal fails with the  profile(80Msps sampling rate)

    We are discussing that internally. Will let you know once we get a fix for it.

Reply Children