1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
|
相关推荐
1个回答
|
|
The ADC is a 6-channel signal-ended 10-bit Successive Approximation Register (SAR) A/D
Converter. It uses the supply and ground as it reference which avoid use of any external reference. It converts the analog input signal into 10-bit binary digital codes at maximum conversion rate of 1MSPS with 13MHz A/D converter clock. RK3399的adc模块从概念以及速率可以得出,该模块是中速AD。 相关配置及文件 CONFIG_ROCKCHIP_SARADC 相关文件: kernel/drivers/iio/adc/rockchip_saradc.c kernel/Documentation/devicetree/bindings/iio/adc/rockchip-saradc.txt static const struct iio_chan_spec rockchip_rk3399_saradc_iio_channels[] = { ADC_CHANNEL(0, "adc0"), ADC_CHANNEL(1, "adc1"), ADC_CHANNEL(2, "adc2"), ADC_CHANNEL(3, "adc3"), ADC_CHANNEL(4, "adc4"), ADC_CHANNEL(5, "adc5"), }; static const struct rockchip_saradc_data rk3399_saradc_data = { .num_bits = 10, .channels = rockchip_rk3399_saradc_iio_channels, .num_channels = ARRAY_SIZE(rockchip_rk3399_saradc_iio_channels), .clk_rate = 1000000, }; static const struct of_device_id rockchip_saradc_match[] = { { .compatible = "rockchip,saradc", .data = &saradc_data, }, { .compatible = "rockchip,rk3066-tsadc", .data = &rk3066_tsadc_data, }, { .compatible = "rockchip,rk3399-saradc", .data = &rk3399_saradc_data, }, {}, }; MODULE_DEVICE_TABLE(of, rockchip_saradc_match); 设备树配置 &saradc { status = "okay"; }; saradc: saradc@ff100000 { compatible = "rockchip,rk3399-saradc"; reg = <0x0 0xff100000 0x0 0x100>; interrupts = #io-channel-cells = <1>; clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>; clock-names = "saradc", "apb_pclk"; resets = <&cru SRST_P_SARADC>; reset-names = "saradc-apb"; status = "disabled"; }; 设备节点 [root@rk3399:/]# ls /dev/iio:device0 /dev/iio:device0 通过sys文件系统节点读取adc采集数据 [root@rk3399:/]# cat /sys/bus/iio/devices/iio:device0/ dev in_voltage3_raw name uevent in_voltage0_raw in_voltage4_raw of_node/ in_voltage1_raw in_voltage5_raw power/ in_voltage2_raw in_voltage_scale subsystem/ [root@rk3399:/]# cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw 259 利用SARADC 来做按键 部分概念 MSPS MSPS–Million Samples per Second 转换速率(Conversion Rate)是指完成一次从模拟转换到数字的AD转换所需的时间的倒数。积分型AD的转换时间是毫秒级属低速AD,逐次比较型AD是微秒级属中速AD,全并行/串并行型AD可达到纳秒级。 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
533 浏览 0 评论
803 浏览 1 评论
700 浏览 1 评论
1926 浏览 1 评论
3171 浏览 1 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 16:37 , Processed in 0.599798 second(s), Total 69, Slave 54 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号