Caliberation/AGC Issue Help

Having issues with the site, hardware, source code, or any other issues?

Moderator: robert.ghilduta

Post Reply
nipunamr
Posts: 21
Joined: Sat Sep 08, 2018 2:05 pm

Caliberation/AGC Issue Help

Post by nipunamr » Mon Sep 17, 2018 9:09 am

It seems my bladeRF (x115) AGC is not working properly. I tried to run it in Matlab (bladeRF_rx_gui) and I get the following warning.

>> bladeRF_rx_gui
Cannot enable AGC. AGC DC LUT file is missing, run `cal table agc rx' in bladeRF-cli.

when I run the version command from "bladeRF-cli program" I get the following,

C:\>bladeRF-cli -i
bladeRF> version

bladeRF-cli version: 1.6.1
libbladeRF version: 2.0.2

Firmware version: 2.2.0-git-3d38fac2
FPGA version: 0.7.3

bladeRF>

I tried to run the "cal table agc rx" and I get the following errors.

bladeRF> cal table agc rx
Calibrated @ 237500000 Hz: I= 128 (Error: 4.59), Q= -32 (Error: 1.47) DC-L
Calibrated @ 247500000 Hz: I= 32 (Error: 1.75), Q= 32 (Error: 4.13) DC-L
UT: Max (I= 2, Q= 3) Mid (I= 22, Q= 27) Min (I= 30, Q= 28)

Error: An unexpected error occurred

bladeRF> cal table agc rx
Calibrated @ 237500000 Hz: I= 32 (Error: 1.59), Q= 32 (Error: 4.16) DC-L
UT: Max (I= 2, Q= 4) Mid (I= 22, Q= 27) Min (I= 30, Q= 27)

Error: An unexpected error occurred

bladeRF> cal table agc rx
Calibrated @ 237500000 Hz: I= 32 (Error: 1.35), Q= 32 (Error: 4.76) DC-L
UT: Max (I= 1, Q= 4) Mid (I= 22, Q= 27) Min (I= 31, Q= 28)

Error: An unexpected error occurred

bladeRF>


Then I used the "print" command to print everything, and I get the following and says "AGC" is disabled

bladeRF> print

RX1 Bandwidth: 1500000 Hz
TX1 Bandwidth: 1500000 Hz

RX1 Frequency: 247500000 Hz
TX1 Frequency: 1000000000 Hz

RX1 AGC: Disabled

GPIO: 0x00190057
LMS Enable: Enabled
LMS RX Enable: Enabled
LMS TX Enable: Enabled
TX Band: Low Band (300M - 1.5GHz)
RX Band: Low Band (300M - 1.5GHz)
RX Source: Baseband

Loopback mode: none

RX mux: BASEBAND - Baseband samples

Gain RX1 overall: 45 dB (Range: [-1, 60])
lna: 6 dB (Range: [0, 6])
rxvga1: 30 dB (Range: [5, 30])
rxvga2: 15 dB (Range: [0, 30])
Gain TX1 overall: 60 dB (Range: [17, 73])
txvga1: -8 dB (Range: [-35, -4])
txvga2: 16 dB (Range: [0, 25])

Sampling: Internal

RX1 sample rate: 3000000 0/1
TX1 sample rate: 3000000 0/1

SMB Mode: Disabled

Current VCTCXO trim: 0x91b1
Stored VCTCXO trim: 0x91b1

VCTCXO tamer mode: Disabled

Expansion GPIO register: 0xffffffff
Expansion GPIO direction register: 0x00000000

bladeRF>


I have attached the Matlab GUI screenshot while running. If I tried to change the AGC dropdown to "AUTO" from "MANUAL" I keep on getting the same Matlab warning (Cannot enable AGC. AGC DC LUT file is missing, run `cal table agc rx' in bladeRF-cli.)
and it goes back to "MANUAL"


What's happening here? Is there a way to enable the AGC?
Attachments
matlab_new.PNG

bglod
Posts: 163
Joined: Thu Jun 18, 2015 6:10 pm

Re: Caliberation/AGC Issue Help

Post by bglod » Mon Sep 17, 2018 10:54 am

Can you try running the "cal table agc rx" command in the CLI with verbose output?

Code: Select all

bladeRF-cli -v verbose -e "cal table agc rx"
Electrical Engineer
Nuand, LLC.

nipunamr
Posts: 21
Joined: Sat Sep 08, 2018 2:05 pm

Re: Caliberation/AGC Issue Help

Post by nipunamr » Mon Sep 17, 2018 2:00 pm

When I ran the command, it was outputting so much information. So, I did a Ctlr+C to stop the program. It eventually, stopped an gives me an error. Here's some output. I'll try to copy the whole output to a file, I haven't figured out yet. Do you want the full output?

C:\>bladeRF-cli -v verbose -e "cal table agc rx"
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:604] Using libusbversion: 1.0.21.11156
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:481] Found a bladeRF (idx=3)
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/libusb.c:371] Mutex name: Global\bladeRF-e4a109238e74dfe563300936c6017bb5
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USBalt setting 0
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:778] Read Firmware version: 2.2.0-git-3d38fac2
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:787] Capability mask before FPGA load: 0x0000000700000000
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USBalt setting 2
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USBalt setting 1
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USBalt setting 2
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USBalt setting 1
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USBalt setting 1
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:505] Read FPGA version: 0.7.3
[VERBOSE @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:510] Capability mask after FPGA load: 0x00000007000007ff
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:392] nios_config_read: Read 0x0019004f
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c:369] Default tuning mode: FPGA
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:982] Clearing RX1 retune queue.
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:1005] RX1 operation duration: 149
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:982] Clearing TX1 retune queue.
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:1005] TX1 operation duration: 52
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:504] nios_lms6_read: Read 0xd0 from addr 0x75
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:516] nios_lms6_write: Wrote 0xd0 to addr 0x75
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:516] nios_lms6_write: Wrote 0x78 to addr 0x76
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:516] nios_lms6_write: Wrote 0x05 to addr 0x65
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:282] Reading MS1
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x01 from addr 0x25
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:291] Read enable register: 0x01
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x33 from addr 0x40
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[0]: 0x33

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0xd1 from addr 0x41
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[1]: 0xd1

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x04 from addr 0x42
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[2]: 0x04

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x00 from addr 0x43
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[3]: 0x00

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x00 from addr 0x44
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[4]: 0x00

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x00 from addr 0x45
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[5]: 0x00

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x05 from addr 0x46
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[6]: 0x05

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x00 from addr 0x47
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[7]: 0x00

[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:480] nios_si5338_read: Read 0x00 from addr 0x48
[VERBOSE @ host/libraries/libbladeRF/src/driver/si5338.c:300] Read regs[8]: 0x00

^C
C:\>

bglod
Posts: 163
Joined: Thu Jun 18, 2015 6:10 pm

Re: Caliberation/AGC Issue Help

Post by bglod » Tue Sep 18, 2018 8:43 am

No, that is okay. This appears to be a bug as we are able to reproduce it on our end. Feel free to track the progress on the issue tracker.
Electrical Engineer
Nuand, LLC.

nipunamr
Posts: 21
Joined: Sat Sep 08, 2018 2:05 pm

Re: Caliberation/AGC Issue Help

Post by nipunamr » Tue Sep 18, 2018 8:57 am

Thanks, Hopefully it will get fixed quickly. I will work on my time stamping problem in the meantime.

Post Reply