完善资料让更多小伙伴认识你,还能领取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可达到纳秒级。 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1496 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
1682 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
3963 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-8 06:29 , Processed in 0.481609 second(s), Total 71, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号