资料介绍

Table of Contents
AD7303 IIO DAC Linux Driver
Supported Devices
Evaluation Boards
Description
This is a Linux industrial I/O (IIO) subsystem driver, targeting single-channel serial interface DACs. 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.
Source Code
Status
Files
| Function | File |
|---|---|
| driver | drivers/iio/dac/ad7303.c |
Example platform device initialization
Devicetree
Required devicetree properties:
- compatible: Needs to be “adi,” followed by the name of the device. E.g. “adi,ad5541a”
- reg: The chipselect number used for the device
- spi-max-frequency: Maximum SPI clock frequency
- Vdd-supply: VDD voltage supply regulator
Optional devicetree properties:
- REF-supply: external reference voltage supply regulator. This should only be set if there is an external reference voltage connected to the REF pin. If not set, Vdd/2 is used as the reference voltage.
dac_vdd: fixedregulator@0 {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};
axi_spi_0: spi@42000000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "xlnx,axi-spi-1.02.a", "xlnx,xps-spi-2.00.a";
...
ad7303@0 {
compatible = "adi,ad7303";
reg = <0>;
spi-max-frequency = <1000000>;
Vdd-supply = <&dac_vdd>;
};
};
Driver testing
Each and every IIO device, typically a hardware chip, has a device folder under /sys/bus/iio/devices/iio:deviceX. Where X is the IIO index of the device. Under every of these directory folders reside a set of files, depending on the characteristics and features of the hardware device in question. These files are consistently generalized and documented in the IIO ABI documentation. In order to determine which IIO deviceX corresponds to which hardware device, the user can read the name file /sys/bus/iio/devices/iio:deviceX/name. In case the sequence in which the iio device drivers are loaded/registered is constant, the numbering is constant and may be known in advance.
This specifies any shell prompt running on the target
root:/> cd /sys/bus/iio/devices/ root:/sys/bus/iio/devices> ls iio:device0 root:/sys/bus/iio/devices> cd iio/:device0 root:/sys/bus/iio/devices/iio:device0> ls -l drwxr-xr-x 2 root root 0 Jul 5 05:10 buffer -r--r--r-- 1 root root 4096 Jul 5 05:10 dev -r--r--r-- 1 root root 4096 Jul 5 05:10 name -rw-r--r-- 1 root root 4096 Jul 5 05:10 out_voltage0_powerdown -rw-r--r-- 1 root root 4096 Jul 5 05:10 out_voltage0_raw -rw-r--r-- 1 root root 4096 Jul 5 05:10 out_voltage1_powerdown -rw-r--r-- 1 root root 4096 Jul 5 05:10 out_voltage1_raw -rw-r--r-- 1 root root 4096 Jul 5 05:10 out_voltage_scale drwxr-xr-x 2 root root 0 Jul 5 05:10 power drwxr-xr-x 2 root root 0 Jul 5 05:10 scan_elements lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../../../../../../../bus/iio drwxr-xr-x 2 root root 0 Jul 5 05:10 trigger -rw-r--r-- 1 root root 4096 Jan 1 1970 uevent
Show device name
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> cat name ad7303
Show scale
Description:
scale to be applied to out_voltage0_raw and out_voltage1_raw in order to obtain the measured voltage in millivolts.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> cat out_voltage_scale 12.890625
Set channel Y output voltage
Description:
/sys/bus/iio/devices/iio:deviceX/out_voltageY_raw
Raw (unscaled, no bias etc.) output voltage for channel Y.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> echo 100 > out_voltage0_raw
U = out_voltage0_raw * out_voltage_scale = 100 * 12.890625 mV = 1289.0625 mV
Enable power down mode on output Y
/sys/bus/iio/devices/iio:deviceX/out_voltageY_powerdown
Description:
Writing 1 causes output Y to enter the power down mode. Clearing returns to normal operation.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> echo 1 > out_voltage0_powerdown root:/sys/bus/iio/devices/iio:device0> cat out_voltage0_powerdown 1 root:/sys/bus/iio/devices/iio:device0> echo 0 > out_voltage0_powerdown root:/sys/bus/iio/devices/iio:device0> cat out_voltage0_powerdown 0
扫码添加小助手
加入工程师交流群
- AD5449 IIO DAC Linux驱动程序
- AD5380 IIO多通道Linux驱动程序DAC
- AD7291 IIO ADC Linux驱动程序
- AD5064 IIO四通道Linux驱动程序DAC
- AD5421 IIO DAC Linux驱动程序
- AD5360 IIO多通道Linux驱动程序DAC
- AD5446 IIO DAC Linux驱动程序
- AD5764 IIO四通道Linux驱动程序DAC
- AD5624 IIO四通道Linux驱动程序DAC
- IIO单通道串行ADC Linux驱动程序
- AD9834 IIO直接数字合成Linux驱动程序
- AD9832 IIO直接数字合成Linux驱动程序
- AD7998 IIO ADC Linux驱动程序
- AD7887 IIO ADC Linux驱动程序
- AD5677R NanDAC+IIO Linux驱动程序
- 怎么编写Framebuffer驱动程序 2.4k次阅读
- 自动删除SDK/Vitis下驱动程序的旧版本的Linux脚本 1k次阅读
- 如何写一个Linux设备驱动程序 5.5k次阅读
- 米尔科技LINUX设备驱动程序教程 2.7k次阅读
- 嵌入式Linux内核的驱动程序开发是怎样的 1.9k次阅读
- 浅谈电脑驱动程序的工作原理 详解电脑驱动程序意义 3.2w次阅读
- 基于嵌入式Linux内核的系统设备驱动程序开发设计 1.5k次阅读
- 基于Linux2.6.30开发DS18B20的驱动程序的类型和文件操作接口函数详解 1.8k次阅读
- 可动态安装的Linux设备驱动程序 1.2k次阅读
- 如何用嵌入式Linux系统编写键盘驱动 1.6k次阅读
- 8255A驱动程序 3.9k次阅读
- 8155驱动程序 3.8k次阅读
- 深入了解USB驱动之总线驱动程序 9.5k次阅读
- Xilinx设备的驱动程序 8.7k次阅读
- PCI驱动程序开发实例 7.3k次阅读
下载排行
本周
- 1新一代网络可视化(NPB 2.0)
- 3.40 MB | 1次下载 | 免费
- 2MDD品牌三极管MMBT3906数据手册
- 2.33 MB | 次下载 | 免费
- 3MDD品牌三极管S9012数据手册
- 2.62 MB | 次下载 | 免费
- 4联想flex2-14D/15D说明书
- 4.92 MB | 次下载 | 免费
- 5收音环绕扩音机 AVR-1507手册
- 2.50 MB | 次下载 | 免费
- 624Pin Type-C连接器设计报告
- 1.06 MB | 次下载 | 免费
- 7MS1000TA 超声波测量模拟前端芯片技术手册
- 0.60 MB | 次下载 | 免费
- 8MS1022高精度时间测量(TDC)电路数据手册
- 1.81 MB | 次下载 | 免费
本月
- 1爱华AIWA HS-J202维修手册
- 3.34 MB | 37次下载 | 免费
- 2PC5502负载均流控制电路数据手册
- 1.63 MB | 23次下载 | 免费
- 3NB-IoT芯片厂商的资料说明
- 0.31 MB | 22次下载 | 1 积分
- 4H110主板CPU PWM芯片ISL95858HRZ-T核心供电电路图资料
- 0.63 MB | 6次下载 | 1 积分
- 5UWB653Pro USB口测距通信定位模块规格书
- 838.47 KB | 5次下载 | 免费
- 6技嘉H110主板IT8628E_BX IO电路图资料
- 2.61 MB | 4次下载 | 1 积分
- 7苏泊尔DCL6907(即CHK-S007)单芯片电磁炉原理图资料
- 0.04 MB | 4次下载 | 1 积分
- 8100W准谐振反激式恒流电源电路图资料
- 0.09 MB | 2次下载 | 1 积分
总榜
- 1matlab软件下载入口
- 未知 | 935137次下载 | 10 积分
- 2开源硬件-PMP21529.1-4 开关降压/升压双向直流/直流转换器 PCB layout 设计
- 1.48MB | 420064次下载 | 10 积分
- 3Altium DXP2002下载入口
- 未知 | 233089次下载 | 10 积分
- 4电路仿真软件multisim 10.0免费下载
- 340992 | 191439次下载 | 10 积分
- 5十天学会AVR单片机与C语言视频教程 下载
- 158M | 183353次下载 | 10 积分
- 6labview8.5下载
- 未知 | 81602次下载 | 10 积分
- 7Keil工具MDK-Arm免费下载
- 0.02 MB | 73822次下载 | 10 积分
- 8LabVIEW 8.6下载
- 未知 | 65991次下载 | 10 积分
电子发烧友App





创作
发文章
发帖
提问
发资料
发视频
上传资料赚积分
评论