Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calibration table generation hangs, performance issues #362

Closed
rfdog opened this issue Dec 31, 2014 · 11 comments
Closed

Calibration table generation hangs, performance issues #362

rfdog opened this issue Dec 31, 2014 · 11 comments
Assignees
Labels
Issue: Bug It's a bug and it oughta be fixed

Comments

@rfdog
Copy link

rfdog commented Dec 31, 2014

It appears the values created by the calibrate table command are incorrect ; typically the DC spike is not removed, whereas it is removed when calling "cal dc rx" manually. Also the calibrate table command will sometimes fail with Error: Operation timed out, or remain frozen.

@jynik
Copy link
Contributor

jynik commented Jan 1, 2015

When you're using the table, it's with the same gain values used when generating the table, correct?

_Update:_ It was later confirmed on IRC that the values were not correct due to a missed cal lms step.

Could you quantify the difference between the I/Q DC offset values for no correction, the cal dc rx, and table-based? Perhaps just save off and share some samples recorded via the CLI, or take a look at the individual channels via osmocom_fft -S.

I know that the table isn't always as effective across power cycles as a cal done at every power cycle, but I'd just like to get a sense of what types of values you're seeing.

For the error/freeze, could you share a verbose log?

@jynik
Copy link
Contributor

jynik commented Jan 6, 2015

Just another item I wanted to verify with regard to the poor perfomance -- you're running cal lms before the cal table dc rx, correct?

The cal lms prior to generating the table, as they are tightly coupled to the I/Q offset values stored in the table. (Perhaps this fact needs to be made more apparent in help text). The LMS cal registers are stored in the table and are written to the device when the table is loaded, ensuring the device is in a similar state to when the calibration had been done.

We've seen that the I/Q DC correction values yield significantly different results when those LMS registers are either uninitialized or initialized to different values.

@Koatman
Copy link

Koatman commented Jan 14, 2015

Yes, I can confirm that the DC spike is substantial, and can lead to spurious out of channel emmission when using a PA, even after generating a table using cal dc table rx in 100kHz steps, at actual gain settings. The DC spike seems to be as large as the synthesized baseband emission, which wastes output power during narrowband TX. Also, the table generation will only work with USB2, and ALWAYS crashes using USB3.

@jynik
Copy link
Contributor

jynik commented Jan 14, 2015

I haven't been able to reproduce the table crash with my USB 3 cards. Why don't we open a new issue to track that, as efforts on resolving that are likely orthogonal to improving. Please include a verbose log and some information about your system & USB 3 controller.

Regarding the DC spike - do you have some before/after screen captures from a signal analyzer? Could you quantify the DC offset you're seeing? (Note that <= -60dB is within ~1 DAC bit...)

I'll look to post back with some captures of what I'm seeing.

@Koatman
Copy link

Koatman commented Jan 17, 2015

Linux version 3.17.6-1-ARCH (builduser@foutrelis) (gcc version 4.9.2 (GCC) ) #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014

CPU0: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz (fam: 06, model: 3c, stepping: 03)

USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)

Intel® Desktop Board DQ87PG - BIOS updated 10-1-14

BladeRF is latest git

Command tunes wrong frequency and crashes...

Failed calibrate command : bladeRF-cli -v verbose -i

set txvga1 -10
set txvga2 15
xb 200 enable
cal lms

calibrate table dc tx 896000000 1295000000 100000

[DEBUG @ bladerf.c:301] Enable Module: TX - False
[VERBOSE @ usb.c:1033] usb_lms_read: 0x40 0x02
[VERBOSE @ usb.c:1012] usb_lms_write: 0x40 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x5a 0x20
[VERBOSE @ lms.c:1464] ---- Frequency ----
[VERBOSE @ lms.c:1465] x : 4
[VERBOSE @ lms.c:1466] nint : 107
[VERBOSE @ lms.c:1467] nfrac : 1747627
[VERBOSE @ lms.c:1468] freqsel : 0x25
[VERBOSE @ lms.c:1469] reference: 38400000
[VERBOSE @ lms.c:1470] freq : 1029200000
[VERBOSE @ usb.c:1033] usb_lms_read: 0x09 0x40
[VERBOSE @ usb.c:1012] usb_lms_write: 0x09 0x45
[VERBOSE @ usb.c:1033] usb_lms_read: 0x15 0x95
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x15 0x95
[VERBOSE @ usb.c:1012] usb_lms_write: 0x10 0x35
[VERBOSE @ usb.c:1012] usb_lms_write: 0x11 0x9a
[VERBOSE @ usb.c:1012] usb_lms_write: 0x12 0xaa
[VERBOSE @ usb.c:1012] usb_lms_write: 0x13 0xab
[VERBOSE @ usb.c:1033] usb_lms_read: 0x16 0x8c
[VERBOSE @ usb.c:1012] usb_lms_write: 0x16 0x8c
[VERBOSE @ usb.c:1033] usb_lms_read: 0x17 0xe0
[VERBOSE @ usb.c:1012] usb_lms_write: 0x17 0xe0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x18 0x40
[VERBOSE @ usb.c:1012] usb_lms_write: 0x18 0x40
[VERBOSE @ usb.c:1033] usb_lms_read: 0x19 0x9c
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ lms.c:1554] Found normal at VCOCAP: 32
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9f
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9e
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x83
[VERBOSE @ lms.c:1593] Found lower limit VCOCAP: 31
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa1
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa2
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa3
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa4
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa5
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa6
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa7
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa8
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa9
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x43
[VERBOSE @ lms.c:1624] Found upper limit VCOCAP: 40
[VERBOSE @ lms.c:1628] Goldilocks VCOCAP: 35
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa3
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ lms.c:1641] VTUNE: 0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x09 0x45
[VERBOSE @ usb.c:1012] usb_lms_write: 0x09 0x40
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x42 0x85
[VERBOSE @ usb.c:1012] usb_lms_write: 0x42 0x86
[VERBOSE @ usb.c:1033] usb_lms_read: 0x43 0x68
[VERBOSE @ usb.c:1012] usb_lms_write: 0x43 0x60
[VERBOSE @ tuning.c:124] Set TX DC offset cal (I, Q) to: (105, -512)
[VERBOSE @ usb.c:1033] usb_lms_read: 0x5a 0x20g: 9.154), Q=-374 (avg: 7.671)
[VERBOSE @ lms.c:1464] ---- Frequency ----
[VERBOSE @ lms.c:1465] x : 4
[VERBOSE @ lms.c:1466] nint : 107
[VERBOSE @ lms.c:1467] nfrac : 1835008
[VERBOSE @ lms.c:1468] freqsel : 0x25
[VERBOSE @ lms.c:1469] reference: 38400000
[VERBOSE @ lms.c:1470] freq : 1029300000
[VERBOSE @ usb.c:1033] usb_lms_read: 0x09 0x40
[VERBOSE @ usb.c:1012] usb_lms_write: 0x09 0x45
[VERBOSE @ usb.c:1033] usb_lms_read: 0x15 0x95
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x15 0x95
[VERBOSE @ usb.c:1012] usb_lms_write: 0x10 0x35
[VERBOSE @ usb.c:1012] usb_lms_write: 0x11 0x9c
[VERBOSE @ usb.c:1012] usb_lms_write: 0x12 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x13 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x16 0x8c
[VERBOSE @ usb.c:1012] usb_lms_write: 0x16 0x8c
[VERBOSE @ usb.c:1033] usb_lms_read: 0x17 0xe0
[VERBOSE @ usb.c:1012] usb_lms_write: 0x17 0xe0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x18 0x40
[VERBOSE @ usb.c:1012] usb_lms_write: 0x18 0x40
[VERBOSE @ usb.c:1033] usb_lms_read: 0x19 0xa3
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ lms.c:1554] Found normal at VCOCAP: 32
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9f
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9e
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x83
[VERBOSE @ lms.c:1593] Found lower limit VCOCAP: 31
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa1
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa2
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa3
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa4
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa5
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa6
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa7
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa8
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa9
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x43
[VERBOSE @ lms.c:1624] Found upper limit VCOCAP: 40
[VERBOSE @ lms.c:1628] Goldilocks VCOCAP: 35
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa3
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ lms.c:1641] VTUNE: 0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x09 0x45
[VERBOSE @ usb.c:1012] usb_lms_write: 0x09 0x40
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x42 0x86
[VERBOSE @ usb.c:1012] usb_lms_write: 0x42 0x86
[VERBOSE @ usb.c:1033] usb_lms_read: 0x43 0x60
[VERBOSE @ usb.c:1012] usb_lms_write: 0x43 0x60
[VERBOSE @ tuning.c:124] Set TX DC offset cal (I, Q) to: (105, -512)
[VERBOSE @ usb.c:1033] usb_lms_read: 0x20 0x34
[VERBOSE @ usb.c:1033] usb_lms_read: 0x21 0x15
[VERBOSE @ usb.c:1033] usb_lms_read: 0x22 0x55
[VERBOSE @ usb.c:1033] usb_lms_read: 0x23 0x55
[DEBUG @ sync_worker.c:95] RX overrun @ buffer 1
[VERBOSE @ usb.c:1033] usb_lms_read: 0x25 0x96
[VERBOSE @ usb.c:1033] usb_lms_read: 0x10 0x35
[VERBOSE @ usb.c:1033] usb_lms_read: 0x11 0x9c
[VERBOSE @ usb.c:1033] usb_lms_read: 0x12 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x13 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x15 0x95
[VERBOSE @ usb.c:1033] usb_lms_read: 0x5a 0x20
[VERBOSE @ lms.c:1464] ---- Frequency ----
[VERBOSE @ lms.c:1465] x : 4
[VERBOSE @ lms.c:1466] nint : 104
[VERBOSE @ lms.c:1467] nfrac : 2053461
[VERBOSE @ lms.c:1468] freqsel : 0x25
[VERBOSE @ lms.c:1469] reference: 38400000
[VERBOSE @ lms.c:1470] freq : 1000750000
[VERBOSE @ usb.c:1033] usb_lms_read: 0x09 0x40
[VERBOSE @ usb.c:1012] usb_lms_write: 0x09 0x45
[VERBOSE @ usb.c:1033] usb_lms_read: 0x15 0x95
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x15 0x95
[VERBOSE @ usb.c:1012] usb_lms_write: 0x10 0x34
[VERBOSE @ usb.c:1012] usb_lms_write: 0x11 0x1f
[VERBOSE @ usb.c:1012] usb_lms_write: 0x12 0x55
[VERBOSE @ usb.c:1012] usb_lms_write: 0x13 0x55
[VERBOSE @ usb.c:1033] usb_lms_read: 0x16 0x8c
[VERBOSE @ usb.c:1012] usb_lms_write: 0x16 0x8c
[VERBOSE @ usb.c:1033] usb_lms_read: 0x17 0xe0
[VERBOSE @ usb.c:1012] usb_lms_write: 0x17 0xe0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x18 0x40
[VERBOSE @ usb.c:1012] usb_lms_write: 0x18 0x40
[VERBOSE @ usb.c:1033] usb_lms_read: 0x19 0xa3
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ lms.c:1554] Found normal at VCOCAP: 32
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9f
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9e
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9d
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9c
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9b
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9a
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x99
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x98
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x97
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x83
[VERBOSE @ lms.c:1593] Found lower limit VCOCAP: 24
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa1
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0xa2
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x43
[VERBOSE @ lms.c:1624] Found upper limit VCOCAP: 33
[VERBOSE @ lms.c:1628] Goldilocks VCOCAP: 28
[VERBOSE @ usb.c:1012] usb_lms_write: 0x19 0x9c
[VERBOSE @ usb.c:1033] usb_lms_read: 0x1a 0x03
[VERBOSE @ lms.c:1641] VTUNE: 0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x09 0x45
[VERBOSE @ usb.c:1012] usb_lms_write: 0x09 0x40
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x42 0x86
[VERBOSE @ usb.c:1012] usb_lms_write: 0x42 0x86
[VERBOSE @ usb.c:1033] usb_lms_read: 0x43 0x60
[VERBOSE @ usb.c:1012] usb_lms_write: 0x43 0x60
[VERBOSE @ tuning.c:124] Set TX DC offset cal (I, Q) to: (105, -512)
[VERBOSE @ usb.c:1033] usb_lms_read: 0x44 0x01
[VERBOSE @ usb.c:1012] usb_lms_write: 0x44 0x03
[VERBOSE @ usb.c:1033] usb_lms_read: 0x75 0xe0
[VERBOSE @ usb.c:1012] usb_lms_write: 0x75 0xc0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x02
[VERBOSE @ usb.c:1012] usb_lms_write: 0x46 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x08 0x00
[DEBUG @ sync_worker.c:95] RX overrun @ buffer 1
[VERBOSE @ usb.c:1033] usb_lms_read: 0x54 0x02
[VERBOSE @ usb.c:1033] usb_lms_read: 0x55 0x17
[VERBOSE @ usb.c:1033] usb_lms_read: 0x7d 0x01
[VERBOSE @ usb.c:1012] usb_lms_write: 0x7d 0x01
[VERBOSE @ usb.c:1033] usb_lms_read: 0x70 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x70 0x03
[VERBOSE @ usb.c:1033] usb_lms_read: 0x7d 0x01
[VERBOSE @ usb.c:1012] usb_lms_write: 0x7d 0x01
[VERBOSE @ usb.c:1033] usb_lms_read: 0x64 0x36
[VERBOSE @ usb.c:1012] usb_lms_write: 0x64 0x36
[VERBOSE @ usb.c:1033] usb_lms_read: 0x25 0x96
[VERBOSE @ usb.c:1012] usb_lms_write: 0x25 0x96
[VERBOSE @ usb.c:1033] usb_lms_read: 0x75 0xc0
[VERBOSE @ usb.c:1012] usb_lms_write: 0x75 0xe0
[VERBOSE @ usb.c:1033] usb_lms_read: 0x0b 0x09
[VERBOSE @ usb.c:1012] usb_lms_write: 0x0b 0x09
[VERBOSE @ usb.c:1033] usb_lms_read: 0x44 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x44 0x01
[VERBOSE @ usb.c:1033] usb_lms_read: 0x46 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x08 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x46 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x08 0x02
[DEBUG @ bladerf.c:301] Enable Module: RX - False
[VERBOSE @ usb.c:1033] usb_lms_read: 0x70 0x03
[VERBOSE @ usb.c:1012] usb_lms_write: 0x70 0x02
[DEBUG @ bladerf.c:301] Enable Module: TX - False
[VERBOSE @ usb.c:1033] usb_lms_read: 0x40 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x40 0x00
[DEBUG @ bladerf.c:301] Enable Module: RX - True
[VERBOSE @ usb.c:1033] usb_lms_read: 0x70 0x02
[VERBOSE @ usb.c:1012] usb_lms_write: 0x70 0x03
[DEBUG @ bladerf.c:301] Enable Module: TX - True
[VERBOSE @ usb.c:1033] usb_lms_read: 0x40 0x00
[VERBOSE @ usb.c:1012] usb_lms_write: 0x40 0x02
[DEBUG @ sync.c:757] sync_tx: Worker is now running.
[VERBOSE @ usb.c:1033] usb_lms_read: 0x42 0x86
[VERBOSE @ usb.c:1012] usb_lms_write: 0x42 0x00
[VERBOSE @ usb.c:1033] usb_lms_read: 0x43 0x60
[VERBOSE @ usb.c:1012] usb_lms_write: 0x43 0x80
[DEBUG @ sync.c:314] sync_rx: Worker is idle. Going to reset buf mgmt.
[DEBUG @ sync.c:334] sync_rx: Reset buf_mgmt consumer index
[DEBUG @ sync.c:349] sync_rx: Worker is now running.
[DEBUG @ bladerf.c:301] Enable Module: TX - False
[VERBOSE @ async.c:214] Stream not done...
[VERBOSE @ async.c:214] Stream not done...
[VERBOSE @ async.c:214] Stream not done...
[VERBOSE @ async.c:214] Stream not done...

[VERBOSE @ async.c:214] Stream not done...

^Z
[1]+ Angehalten bladeRF-cli -v verbose -i

@jynik jynik changed the title Calibration table command fails to perform Calibration table generation hangs, performance issues Jan 26, 2015
@jynik jynik self-assigned this Jan 26, 2015
@jynik
Copy link
Contributor

jynik commented Feb 18, 2015

Marking this as a duplicate, as I believe this and #373 are the same or tightly coupled.

@mambrus
Copy link
Contributor

mambrus commented Feb 18, 2015

I agree. Hoping rfdog agrees too and are able to confirm result whence issue is solved.

@jynik jynik added the Issue: Bug It's a bug and it oughta be fixed label Feb 28, 2015
@jynik
Copy link
Contributor

jynik commented Apr 16, 2015

Note to self - need to revisit this now that we found that there were some PLLs losing lock at certain temperatures and frequencies... may be related.

@jynik
Copy link
Contributor

jynik commented Nov 6, 2015

Finally getting around to digging into this...sorry for the embarrassingly long delay folks.

Been running master in Windows (libusb 1.0.19 backend) and have not seen the lockups that I see in Linux or OSX)... just thought this was an observation worth recording.

@jynik
Copy link
Contributor

jynik commented Dec 4, 2015

Further research into this indicates that the problem is in firmware.

It seems that the RX side is actually what locks up (this is used in the TX cal). This can be reproduced using the libbladeRF_test_repeated_stream program.

Once locked up, we can continue to use TX, but not RX. Reloading the FPGA has no effect, suggesting FX3 firmware may be the source of the problem.

FW v1.6.1 does not appear to exhibit this, but v1.7.1 does. The latter introduced changes intended to flush the DMA channels upon restarting a stream -- I will be focusing on this change.

@jynik
Copy link
Contributor

jynik commented Dec 29, 2015

As of 1154ef7, the calibration routines should no longer induce lockups. I've re-implemented them in a manner that does not repeated start/stop streams, so this can be avoided.

The new implementation of the DC cal routines tends to yield better results, as they try a bit harder to yield results in the edge cases, and some other measure are taken to yield better results:

  • TX and RX frequencies are kept >= 1 MHz apart to avoid PLLs interfering with one another
  • The TX cal places F_RX 1 MHz below F_TX and then mixes the TX DC tone to baseband and filters everything else out.

In general, the TX cal's been much better for me. However, I see that calibrating in loopback does not adequately account for the DC offset contribution from the PAs. Therefore, a future work will be to allow calibration via external loopback (as an opt-in option). I've tested this in MATLAB and found it to yield good results.

@jynik jynik closed this as completed Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Bug It's a bug and it oughta be fixed
Projects
None yet
Development

No branches or pull requests

4 participants