AnsweredAssumed Answered

Trying to build zc706 zynq / ad9361 kernel / libiio examples

Question asked by John-Morris on Aug 18, 2014
Latest reply on Aug 19, 2014 by larsc

Hi,

 

I'm new to zynq and ad9361 and still finding my way around - please be patient while I learn!

 

The example code in libiio/examples/ad9361-iiostream.c looks to be quite a good start point for what I need to do. It all compiled ok, but when run it fails with this:

 

* Initializing AD9361 IIO streaming channels

ad9361-iiostream: ad9361-iiostream.c:206: main: Assertion `get_ad9361_stream_ch(ctx, TX, tx, 0, &tx0_i) && "TX chan i not found"' failed.

 

Digging in, it's looking for a Tx "out_voltage" channel on iio device 3 (the DAC), but there are only "out_altvoltage" channels available according to /sys. Trying to debug this was hard because the system came with Linux 3.13 but the source in github is 3.14. The 3.14 source looked as though it should provide those "out_volatge" channels, so I decided to try a later kernel.

 

So I followed the procedure at Zynq and the AD9361 and/or AD9364 [Analog Devices Wiki] to build an up to date kernel and device tree blob. The resulting kernel hangs during boot. The last few lines on the serial console are:

 

bootconsole [earlycon0] disabled                                                           
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f0018000                                    
[drm] Initialized drm 1.1.0 20060810                                                       
drivers/gpu/drm/adi_axi_hdmi/axi_hdmi_drv.c:axi_hdmi_platform_probe[176]                   
platform 70e00000.axi_hdmi: Driver axi-hdmi requests probe deferral                        
brd: module loaded                                                                         
loop: module loaded                                                                        
libphy: XEMACPS mii bus: probed                                                            
xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54                             
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver                                 
ULPI transceiver vendor/product ID 0x0424/0x0007                                           
Found SMSC USB3320 ULPI transceiver.                                                       
ULPI integrity check: passed.                                                              
zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller                                
zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1                       
zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000                                           
zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00                                          

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

usbcore: registered new interface driver usb-storage

usbcore: registered new interface driver usbserial

usbcore: registered new interface driver usbserial_generic

usbserial: USB Serial support registered for generic

usbcore: registered new interface driver ftdi_sio

usbserial: USB Serial support registered for FTDI USB Serial Device

mousedev: PS/2 mouse device common for all mice

i2c /dev entries driver

adv7511 0-0039: Failed to write 98 = 3: -5

adv7511: probe of 0-0039 failed with error -5

 

And there it stops.

 

The system is partly alive - if I plug/unplug USB devices the appropriate messages appear on the serial console - but the system never reaches the command line prompt.

 

I did not update the boot code or the FPGA code (another issue: the published hdl won't build in the latest Xilinx Vivado) , so I'm wondering if the newly built dtb has a mismatch with the older FPGA config.

 

Any pointers would be appreciated.

 

John Morris.

Outcomes