After reading the reference manual I think I should be able to use 64 hopping frequencies on each of my hopping channels. But I can't seem to get it to work no matter what I try. I want to use GPIO indexing to jump to specific frequencies. I am using Hop 1 and Hop 2 to control Tx1 and Tx2 respectively.
Here are the commands I am running to perform setup my hops:
iio_attr -D adrv9002-phy fh_table_index_control_mode 2 iio_attr -D adrv9002-phy fh_mode 3 iio_attr -D adrv9002-phy fh_hop1_pin_set 3 iio_attr -D adrv9002-phy fh_hop2_pin_set 4 iio_attr -D adrv9002-phy fh_table_index_control_npins 6 iio_attr -D adrv9002-phy fh_table_index_control_pin1 5 iio_attr -D adrv9002-phy fh_table_index_control_pin2 6 iio_attr -D adrv9002-phy fh_table_index_control_pin3 7 iio_attr -D adrv9002-phy fh_table_index_control_pin4 8 iio_attr -D adrv9002-phy fh_table_index_control_pin5 9 iio_attr -D adrv9002-phy fh_table_index_control_pin6 10 cat 61.44.bin > "/sys/bus/iio/devices/iio:device1/stream_config" cat 61.44.json > "/sys/bus/iio/devices/iio:device1/profile_config" cat TableA_915.csv >> /sys/bus/iio/devices/iio:device1/frequency_hopping_hop1_table_a cat TableB_915.csv >> /sys/bus/iio/devices/iio:device1/frequency_hopping_hop1_table_b cat TableA_915.csv >> /sys/bus/iio/devices/iio:device1/frequency_hopping_hop2_table_a cat TableB_915.csv >> /sys/bus/iio/devices/iio:device1/frequency_hopping_hop2_table_b iio_attr -c adrv9002-phy -o voltage0 port_en_mode pin iio_attr -c adrv9002-phy -o voltage1 port_en_mode pin
My frequency tables are as follows:
TableA_915.csv
900000000,0,0,0,0,0,0, 901000000,0,0,0,0,0,0, 902000000,0,0,0,0,0,0, 903000000,0,0,0,0,0,0, 904000000,0,0,0,0,0,0, 905000000,0,0,0,0,0,0, 906000000,0,0,0,0,0,0, 907000000,0,0,0,0,0,0, 908000000,0,0,0,0,0,0, 909000000,0,0,0,0,0,0, 910000000,0,0,0,0,0,0, 911000000,0,0,0,0,0,0, 912000000,0,0,0,0,0,0, 913000000,0,0,0,0,0,0, 914000000,0,0,0,0,0,0, 915000000,0,0,0,0,0,0, 916000000,0,0,0,0,0,0, 917000000,0,0,0,0,0,0, 918000000,0,0,0,0,0,0, 919000000,0,0,0,0,0,0, 920000000,0,0,0,0,0,0, 921000000,0,0,0,0,0,0, 922000000,0,0,0,0,0,0, 923000000,0,0,0,0,0,0, 924000000,0,0,0,0,0,0, 925000000,0,0,0,0,0,0, 926000000,0,0,0,0,0,0, 927000000,0,0,0,0,0,0, 928000000,0,0,0,0,0,0, 929000000,0,0,0,0,0,0, 930000000,0,0,0,0,0,0, 931000000,0,0,0,0,0,0,
TableB_915.csv
932000000,0,0,0,0,0,0, 933000000,0,0,0,0,0,0, 934000000,0,0,0,0,0,0, 935000000,0,0,0,0,0,0, 936000000,0,0,0,0,0,0, 937000000,0,0,0,0,0,0, 938000000,0,0,0,0,0,0, 939000000,0,0,0,0,0,0, 940000000,0,0,0,0,0,0, 941000000,0,0,0,0,0,0, 942000000,0,0,0,0,0,0, 943000000,0,0,0,0,0,0, 944000000,0,0,0,0,0,0, 945000000,0,0,0,0,0,0, 946000000,0,0,0,0,0,0, 947000000,0,0,0,0,0,0, 948000000,0,0,0,0,0,0, 949000000,0,0,0,0,0,0, 950000000,0,0,0,0,0,0, 951000000,0,0,0,0,0,0, 952000000,0,0,0,0,0,0, 953000000,0,0,0,0,0,0, 954000000,0,0,0,0,0,0, 955000000,0,0,0,0,0,0, 956000000,0,0,0,0,0,0, 957000000,0,0,0,0,0,0, 958000000,0,0,0,0,0,0, 959000000,0,0,0,0,0,0, 960000000,0,0,0,0,0,0, 961000000,0,0,0,0,0,0, 962000000,0,0,0,0,0,0, 963000000,0,0,0,0,0,0,
I split my 64 frequencies across both Table A and Table B, because when I try adding more than 33 lines to a single table I get the following error:
root@test:~# cat TableA_915.csv >> /sys/bus/iio/devices/iio:device1/frequency_hopping_hop1_table_a [ 1520.755745] adrv9002 spi1.0: Hop:0 table:0 too big:33 cat: write error: Invalid argument root@test:~# cat TableA_915.csv > /sys/bus/iio/devices/iio:device1/frequency_hopping_hop1_table_a [ 1529.887701] adrv9002 spi1.0: Hop:0 table:0 too big:33 cat: write error: Invalid argument root@test:~#
When I use Table A and Table B's above, I see my system happily hop from 900-931 MHz. However for index values 32-63 the system sits at 900MHz.
Are you able to identify anything I might be doing wrong?