Hi All,
I'm trying to use the internal GPIO connector of an N321 to read an external 
digital signal.

Cabling: after looking at the N321 schematic, I found that the GPIO connector 
on the board mates with a Molex duo-clasp connector, 20 contacts, 2 rows. After 
buying the casing and the pins I patched up a cable exposing all 20 pins. Is 
anyone aware of a better option to connect to the GPIO interface?

UHD api: running the GPIO example from uhd 4.2 (with no nothing connected to 
the GPIO) I get the attached output. The way I interpret this is that all the 
registers are reading 1. This seems weird as I would expect the values of 
unconnected pins to be 0.

Running the test again with all data pin grounded to the GPIO Vss or connected 
to the 3.3V produces the same output.

Is the GPIO interface working at all on the N321?

Thanks,
Lorenzo

$ ~/uhd/host/build/examples$ sudo ./gpio --args="master_clock_rate=200e6" 
--bitbang --ddr 0x0 --out 0x0 --repeat

Creating the usrp device with: master_clock_rate=200e6...
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106600; UHD_4.2.0.0-4-g04d14cd7
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: 
mgmt_addr=192.168.20.2,type=n3xx,product=n320,serial=<my 
serial>,name=ni-n3xx-31CCFB3,fpga=XG,claimed=False,addr=192.168.20.2,master_clock_rate=200e6
[INFO] [MPM.PeriphManager] init() called with device args 
`fpga=XG,master_clock_rate=200e6,mgmt_addr=192.168.20.2,name=ni-n3xx-31CCFB3,product=n320,clock_source=internal,time_source=internal'.
[INFO] [MPM.Rhodium-0] init() called with args 
`fpga=XG,master_clock_rate=200e6,mgmt_addr=192.168.20.2,name=ni-n3xx-31CCFB3,product=n320,clock_source=internal,time_source=internal'
[INFO] [MPM.Rhodium-1] init() called with args 
`fpga=XG,master_clock_rate=200e6,mgmt_addr=192.168.20.2,name=ni-n3xx-31CCFB3,product=n320,clock_source=internal,time_source=internal'
[INFO] [MPM.Rhodium-0.init.LMK04828] LMK initialized and locked!
[INFO] [MPM.Rhodium-1.init.LMK04828] LMK initialized and locked!
[INFO] [MPM.Rhodium-0.DAC37J82] DAC PLL Locked!
[INFO] [MPM.Rhodium-0.AD9695] ADC PLL Locked!
[INFO] [MPM.Rhodium-0.init] JESD204B Link Initialization & Training Complete
[INFO] [MPM.Rhodium-1.DAC37J82] DAC PLL Locked!
[INFO] [MPM.Rhodium-1.AD9695] ADC PLL Locked!
[INFO] [MPM.Rhodium-1.init] JESD204B Link Initialization & Training Complete
Using Device: Single USRP:
  Device: N300-Series Device
  Mboard 0: n320
  RX Channel: 0
    RX DSP: 0
    RX Dboard: A
    RX Subdev: Rhodium
  RX Channel: 1
    RX DSP: 1
    RX Dboard: B
    RX Subdev: Rhodium
  TX Channel: 0
    TX DSP: 0
    TX Dboard: A
    TX Subdev: Rhodium
  TX Channel: 1
    TX DSP: 1
    TX Dboard: B
    TX Subdev: Rhodium

Using GPIO bank: FP0
  rx_subdev_spec: A:0 B:0
  tx_subdev_spec: A:0 B:0
Initial GPIO values:
       Bit: 10  9  8  7  6  5  4  3  2  1  0
      CTRL:  0  0  0  0  0  0  0  0  0  0  0
       DDR:  1  1  1  1  1  1  1  1  1  1  1
    ATR_0X:  0  0  0  0  0  0  0  0  0  0  0
    ATR_RX:  0  0  0  0  0  0  0  0  0  0  0
    ATR_TX:  0  0  0  0  0  0  0  0  0  0  0
    ATR_XX:  0  0  0  0  0  0  0  0  0  0  0
       OUT:  0  0  0  0  0  0  0  0  0  0  0
  READBACK:  0  0  0  0  0  0  0  0  0  0  0
       SRC: RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0

Configured GPIO values:
       Bit: 10  9  8  7  6  5  4  3  2  1  0
      CTRL:  0  0  0  0  0  0  0  0  0  0  0
       DDR:  0  0  0  0  0  0  0  0  0  0  0
    ATR_0X:  0  0  0  0  0  0  0  0  0  0  0
    ATR_RX:  0  0  0  0  0  0  0  0  0  0  0
    ATR_TX:  0  0  0  0  0  0  0  0  0  0  0
    ATR_XX:  0  0  0  0  0  0  0  0  0  0  0
       OUT:  0  0  0  0  0  0  0  0  0  0  0
  READBACK:  1  1  1  1  1  1  1  1  1  1  1
       SRC: RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0 RF0

Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 1 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 2 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 3 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 4 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 5 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 6 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1

Loop 7 completed
Press Ctrl + C to quit...
READBACK:   1  1  1  1  1  1  1  1  1  1  1 1

Done!


_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to