Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
playground:playground [06 Aug 2020 18:40] Kieran Barrettplayground:playground [05 Apr 2024 13:03] (current) – Edit Tinaco Mariel
Line 1: Line 1:
-====== EV1HMC8362LP6G/EV1HMC8364LP6G User Guide ====== +====== AD8460 IIO DAC Linux Driver ======
-====Evaluating the HMC8362/HMC8364 Low Noise Quadband Voltage Controlled Oscillators (VCOs) ====+
  
 +===== Supported Devices =====
  
 +  * [[adi>AD8460]]
  
-{{:playground:16lfcsppinout.png?nolink&200|}}+===== Evaluation Boards =====
  
-[[#Pin Map|Pin Map link]] +  * [[adi>EVAL-AD8460SDZ]]
-A brand new test: blah blah blah+
  
-<WRAP tip>For help/assistance/support on the above check out: [[#Level 1 Headline]]</WRAP>+===== Description =====
  
 +This is a Linux industrial I/O (IIO) subsystem driver, targeting single channel DAC. The industrial I/O subsystem provides a unified framework for drivers for many different types of converters and sensors using a number of different physical interfaces (i2c, spi, etc). See IIO for more information.
  
 +See [[software:linux:docs:iio:iio|IIO]] for more information.
  
-====== ======+{{ :software:driver:linux:ad8460-fbl.png}}
  
-====== . ====== 
  
-====== ======+====== Source Code ======
  
 +===== Status =====
  
-====== ======+^ Source ^ Mainlined? ^ 
 +| [[git.linux.org>drivers/iio/dac/ad8460.c|git]] | [No] |
  
 +===== Files =====
  
 +^ Function ^ File ^
 +| driver  | [[linux.github>master?drivers/iio/dac/ad8460.c | drivers/iio/dac/ad8460.c]] |
 +| include  | [[linux.github>master?include/dt-bindings/iio/adi,ad8460.h | include/dt-bindings/iio/adi,ad8460.h]] |
 +| Documentation  | [[linux.github>master?Documentation/devicetree/bindings/iio/dac/ad8460.txt | Documentation/devicetree/bindings/iio/dac/ad8460.txt]] |
  
  
 +====== Hardware configuration ======
  
 +==== Device tree example ====
  
 +The following example instantiates the ad8460 driver for an AD8460 device connected on the SPI bus to the chip-select line 0.
  
 +<code>
 +#include <dt-bindings/iio/adi,ad8460.h>
 +#include "zynq-zed.dtsi"
 +#include "zynq-zed-adv7511.dtsi"
  
 +/ {
 + clocks {
 + sync_ext_clk: ext-clk {
 + #clock-cells = <0x0>;
 + compatible = "fixed-clock";
 + clock-frequency = <500000>;
 + clock-output-names = "sync_ext_clk";
 + };
 + };
 +};
  
 +&fpga_axi {
  
-====== Please select your scenario ====== + tx_dma: tx_dmac@44000000 { 
-  [[#mbed microcontroller and AD5677R evaluation board|I am using ADI's evaluation board system: an SDP-K1 controller board and an EVAL-AD5677R eval board]] + compatible "adi,axi-dmac-1.00.a"; 
-  - [[#mbed microcontroller and AD5677R evaluation board|I am using my own microcontroller board that is mbed compatible and an AD5677R evaluation board]] + reg = <0x44000000 0x1000>; 
-  - [[#mbed microcontroller and AD5677R evaluation board|I am using my own microcontroller board that is not mbed compatible and an AD5677R evaluation board]] + interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; 
-  I just want to see the AD5677R driver code.+ clocks = <&clkc 15>; 
 + #dma-cells = <1>;
  
-====== SDP-K1 and AD5677R evaluation board ======+ adi,channels { 
 + #size-cells <0>; 
 + #address-cells <1>;
  
 + dma-channel@0 {
 + reg = <0>;
 + adi,source-bus-width = <64>;
 + adi,source-bus-type = <0>;
 + adi,destination-bus-width = <32>;
 + adi,destination-bus-type = <2>;
 + adi,cyclic;
 + };
 + };
 + };
 +};
  
-===== Hardware setup ===== +&spi0 
-  * [[https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-AD5677R.html | EVAL-AD5677R evaluation board]]  + status = "okay";
-  * [[https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/sdp-k1.html | SDP-K1 controller board]] +
-{{ :playground:ad5677r_eval_board_chain_with_sdp-k1.png?nolink&600 |}} +
-  - Connect the EVAL-AD5677R to the SDP-K1 controller board. +
-  - Connect the SDP-K1 controller board to your computer over USB. +
  
-===== Software setup ===== + ad8460: dac@0 { 
-  * [[https://ide.mbed.com/compiler|Mbed Online Compiler]] + compatible "adi,ad8460"; 
-  * [[https://os.mbed.com/platforms/SDP_K1/|SDP-K1 on Mbed]] + reg <0>; 
-  * [[https://wiki.analog.com/resources/tools-software/uc-drivers/ad5676 | nanoDAC+ No-OS Driver]] + spi-max-frequency <8000000>; 
-  * [[https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dac/ad5676 | nanoDAC+ IIO DAC Linux Driver]]+ adi,rset-ohms <2000>; 
 + adi,ilim-microamp = <100000 100000>; 
 + adi,vlim-microvolt = <(-40000000) 40000000>; 
 + adi,temp-lim-millicelsius = <40000>;
  
-The software stack is structured in the following way: + clocks <&sync_ext_clk>; 
-{{ :resources:tools-software:product-support-software:nanodac_software_layers.jpg?250 |}} + clock-names = "sync_clk";
-  -     Download the [[https://os.mbed.com/teams/AnalogDevices/code/EVAL-AD568x-AD569x/|EVAL-AD568x-AD569x]] driver.  Despite the name, this driver code also supports the AD5677R.   +
-  - This driver defaults to supporting the AD5686R.  To change to the AD5677R, edit the app_config.h file. +
-  -     Ensure SDP-K1 controller board is selected (top right of online-compiler page). +
-  -     Compile the code. +
-  -     After a successful compile a binary will be downloaded to your computer - store this on your drive. +
-  -     Drag and drop this binary to the USB drive hosted by your controller board. +
-  -     Start up a serial terminal emulator (e.g. Tera Term) +
-  -     Find the com-port your controller board is connected on and select it. +
-  -     Set the baud-rate for 115200 +
-  -     Reset the controller board and connect. +
-  -     Use the menu provided over the terminal window to access the evaluation board. +
-====== mbed microcontroller and AD5677R evaluation board ====== +
-===== Hardware setup ===== +
-{{ :playground:ad5677r_eval_board_chain_with_mbed_microcontroller_board.png?nolink&600 |}} +
-  * [[https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-AD5677R.html | EVAL-AD5677R evaluation board]]  +
-  * [[https://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/sdp-k1.html | SDP-K1 controller board]]+
  
-==== Quick start ====+ dma-names "tx"; 
 + dmas <&tx_dma 0>; 
 + }; 
 +};
  
-  - Connect the SPI lines from the EVAL-AD5677R to the SPI lines of your microcontroller board.  If your microcontroller is compatible with the arduino xxx form factor, then you should be able to just plug your microcontroller board and the EVAL-AD5677R together. +</code>
-  - Connect your micrcontroller board to your computer. +
  
 +====== Driver testing ======
  
 +If the driver correctly detected the device, the "iio_info" program should inform us about the available channels:
  
-===== Software setup ===== +<code> 
-      Go to the link of the code provided above in the 'Downloads' section and import code into Mbed online compiler (Edit app_config.h file (defaults to SDP connector and AD5686R device) if evaluating any other device). +root@linaro-ubuntu-desktop:~# iio_info  
-      Ensure SDP-K1 controller board is selected (top right of online-compiler page). +Library version: 0.24 (git tag: accb7b5) 
-      Compile the code. +Compiled with backends: local xml ip usb serial 
-      After a successful compile a binary will be downloaded to your computer store this on your drive. +IIO context created with local backend
-      Drag and drop this binary to the USB drive hosted by your controller board. +Backend version: 0.24 (git tag: accb7b5
-      Start up a serial terminal emulator (e.g. Tera Term) +Backend description string: Linux analog 6.1.0-271638-g3dfbf1932ce9-dirty #348 SMP PREEMPT Fri Apr  5 16:48:16 CST 2024 armv7l 
-          Find the com-port your controller board is connected on and select it. +IIO context has 9 attributes: 
-          Set the baud-rate for 115200 +        hdl_system_id: [ad8460] on [zed] git branch [master] git [ea29a37eae8a1daeaadb79281b3085709aaedb1c] clean [2024-01-29 03:51:24] UTC 
-          Reset the controller board and connect. +        hw_model: AD8460-FMC-EVAL-BZ on Xilinx Zynq ZED 
-      Use the menu provided over the terminal window to access the evaluation board. +        hw_carrier: Xilinx Zynq ZED 
- +        hw_mezzanine: AD8460-FMC-EVAL-BZ 
-The software stack is structured in the following way+        hw_name: AD8460-EVAL-RevB 
-{{ :resources:tools-software:product-support-software:nanodac_software_layers.jpg?250 |}} +        hw_vendorAnalog Devices 
- +        hw_serialAD8460-FMC-EVAL-BZ 
- +        local,kernel6.1.0-271638-g3dfbf1932ce9-dirty 
- +        uri: local: 
- +IIO context has 4 devices: 
-Quick start steps: +        hwmon0: e000b000ethernetffffffff00 
-  -     Connect the nanodac+ EVAL-board to the SDP-K1 controller board. +                1 channels found: 
-  -     Connect the SDP-K1 controller board to your computer over USB. +                        temp1:  (input
-  -     Go to the link of the code provided above in the 'Downloads' section and import code into Mbed online compiler (Edit app_config.h file (defaults to SDP connector and AD5686R deviceif evaluating any other device). +                        3 channel-specific attributes found: 
-      Ensure SDP-K1 controller board is selected (top right of online-compiler page). +                                attr  0: crit value: 100000 
-  -     Compile the code. +                                attr  1: input value: 16000 
-  -     After a successful compile a binary will be downloaded to your computer - store this on your drive. +                                attr  2: max_alarm value: 0 
-  -     Drag and drop this binary to the USB drive hosted by your controller board. +                No trigger on this device 
-      Start up a serial terminal emulator (e.g. Tera Term+        iio:device0: xadc 
-          Find the com-port your controller board is connected on and select it. +                9 channels found: 
-  -         Set the baud-rate for 115200 +                        voltage5: vccoddr (input
-  -         Reset the controller board and connect. +                        3 channel-specific attributes found: 
-  -     Use the menu provided over the terminal window to access the evaluation board+                                attr  0: label value: vccoddr 
-   +                                attr  1: raw value: 2048 
-====== Features ====== +                                attr  2: scale value: 0.732421875 
-  * High accuracyAD5686R  (16-bit) ±2 LSB max +                        voltage0: vccint (input) 
-  * Low drift 2.5 V on-chip reference2 ppm/°C typ temperature coefficient +                        3 channel-specific attributes found: 
-  * Tiny Package: 3 mm × 3 mm 16-lead LFCSP or 16-lead TSSOP +                                attr  0label value: vccint 
-  * Unordered List Item Total Unadjusted Error (TUE)TBD max  +                                attr  1raw value: 1382 
-  * Unordered List Item Offset error: 1.5 mV max +                                attr  2: scale value: 0.732421875 
-  * Gain error: 0.1 % of FSR max +                        voltage4vccpaux (input) 
-  * High drive capability20 mA, 0.5 V from supply rails  +                        channel-specific attributes found: 
-  * User selectable gain of or 2 (GAIN pin) +                                attr  0label value: vccpaux 
-  * Reset to zero-scale or midscale (RSTSEL pin+                                attr  1: raw value: 2454 
-  * 1.8 V logic compatibility +                                attr  2: scale value: 0.732421875 
-  * 50 MHz SPI with readback or daisy-chain +                        temp0:  (input) 
-  * Low glitch: 0.5 nV-s +                        3 channel-specific attributes found: 
-  * Robust 4 kV HBM and 1.5 kV FICDM ESD rating +                                attr  0: offset value: -2219 
-  * Low power mW at 3 V +                                attr  1: raw value: 2534 
-  2.7 V to 5.5 V power supply +                                attr  2: scale value: 123.040771484 
-  * −40°C to +105°C temperature range +                        voltage7: vrefn (input
- +                        3 channel-specific attributes found: 
-====== Introduction ====== +                                attr  0: label value: vrefn 
-The AD568xR are quad, 12-/14-/16-bit buffered voltage-out +                                attr  1: raw value: -4 
-DACs. The devices include a 2.5V internal reference (enabled +                                attr  2: scale value: 0.732421875 
-by default) coupled with a gain select pin giving a full scale +                        voltage1: vccaux (input) 
-output of 2.5V (GAIN=1or 5V(GAIN=2). All devices operate +                        3 channel-specific attributes found: 
-from a single 2.7 V to 5.5 V supply, are guaranteed monotonic +                                attr  0: label value: vccaux 
-by design and exhibit less than 0.1% FSR gain error and 2mV +                                attr  1raw value: 2452 
-offset error performanceThe devices are housed in a 3mm X +                                attr  2: scale value: 0.732421875 
-3mm LFCSP and TSSOP packages. +                        voltage2: vccbram (input) 
-The part also incorporates a power-on reset circuit that ensures +                        3 channel-specific attributes found: 
-the DAC output powers up to zeroscale or midscale and +                                attr  0: label value: vccbram 
-remains there until a valid write takes place. +                                attr  1: raw value: 1381 
-{{ :playground:MainWindow.jpg? |}} +                                attr  2: scale value: 0.732421875 
-===== Block Diagram ====== +                        voltage3: vccpint (input
-{{ :playground:ad5686r_block_diagram.png?300 |}} +                        3 channel-specific attributes found: 
-====== Pin Map ====== +                                attr  0: label value: vccpint 
-{{:playground:16lfcsppinout.png?|}}{{:playground:16tssoppinout.png?|}} +                                attr  1: raw value: 1376 
-====== Quick Setup Connection Table ====== +                                attr  2: scale value: 0.732421875 
-^ Mnemonic       ^ Description                      ^ +                        voltage6: vrefp (input) 
-| VOUTA          | Analog Output Voltage from DAC A |  +                        3 channel-specific attributes found: 
- +                                attr  0: label value: vrefp 
- +                                attr  1: raw value: 1702 
-====== Level Headline ====== +                                attr  2scale value0.732421875 
-* [[/resources/eval/user-guides/inertial-mems/accelerometers/adxl314|Evaluating the ADXL314]] +                2 device-specific attributes found: 
- +                                attr  0sampling_frequency value961538 
- +                                attr  1: waiting_for_supplier value: 0 
-===== Level Headline ===== +                No trigger on this device 
- +        iio:device1ad8460 
-==== Level Headline ==== +                1 channels found: 
- +                        altvoltage0 (output) 
-=== Level Headline === +                        2 channel-specific attributes found: 
- +                                attr  0: powerdown value: 0 
-== Level 5 Headline == +                                attr  1: sampling_frequency value: 500000 
-== Signal Picture == +                2 device-specific attributes found: 
-{{:playground:cn0196_testshot.jpg?200|CN-0196-EZBOARD}} +                                attr  0: scale value: 80 
- +                                attr  1: waiting_for_supplier value: 0 
-This is the CN-0196 Lab board. You can change the capacitors by resolder ones up to 50V specification instead of the used 25V electrolytic ones. +                5 debug attributes found: 
- +                                debug attr  0: apg_pattern_memory value: 0 0x2000 
-=+                                debug attr  1: shutdown_flag value: 0 
 +                                debug attr  2: apg_pattern_depth value: 3 
 +                                debug attr  3: apg_mode_enable value: 0 
 +                                debug attr  4: direct_reg_access value: 0x10 
 +                No trigger on this device 
 +        iio_sysfs_trigger: 
 +                0 channels found
 +                2 device-specific attributes found: 
 +                                attr  0: add_trigger ERROR: Permission denied (13) 
 +                                attr  1: remove_trigger ERROR: Permission denied (13
 +                No trigger on this device 
 +</code>
playground/playground.1596732019.txt.gz · Last modified: 06 Aug 2020 18:40 by Kieran Barrett