4074
- 收藏
- 点赞
- 分享
- 举报
HI3518 + AR0130 sensor初始化异常
平台是HI3518E + AR0130 + Hi3518E_V100R001C01SPC081,跑了MPP里面的tools下的vi_bayerdump,
在跑这个例程之前,读取I2C,如下:
# ./i2c_read 0x60 0x3004 0x3008 2 2
dev_addr:0x60; reg_addr:0x3004; reg_addr_end:0x3008; reg_width: 2; data_width: 2.
0x3004 0x422
0x3005 0x22ff
0x3006 0xffff
0x3007 0xff60
0x3008 0x6000
0x3009 0x1
#
结果运行这个例程,完成这个sensor_init后,再去读
i2c结果,都回来是全f。
在跑这个例程之前,读取I2C,如下:
# ./i2c_read 0x60 0x3004 0x3008 2 2
dev_addr:0x60; reg_addr:0x3004; reg_addr_end:0x3008; reg_width: 2; data_width: 2.
0x3004 0x422
0x3005 0x22ff
0x3006 0xffff
0x3007 0xff60
0x3008 0x6000
0x3009 0x1
#
结果运行这个例程,完成这个sensor_init后,再去读
i2c结果,都回来是全f。
应该是sensor驱动中的init出错了吧,用的sdk的啊,如下:
Ar0130_sensor_ctl.c component\isp\sensor\Aptina_ar0130 17231 2016/8/4
void sensor_init()
{
//[720p30]
sensor_write_register( 0x301A, 0x0001 ); // RESET_REGISTER
delay_ms(200); //ms
sensor_write_register( 0x301A, 0x10D8 ); // RESET_REGISTER
delay_ms(200); //ms
//Linear Mode Setup
//AR0130 Rev1 Linear sequencer load 8-2-2011
sensor_write_register( 0x3088, 0x8000 );// SEQ_CTRL_PORT
sensor_write_register( 0x3086, 0x0225 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x5050 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2D26 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0828 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0D17 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0926 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0028 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0526 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0xA728 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0725 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x8080 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2917 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0525 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0040 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2702 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1616 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2706 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1736 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x26A6 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1703 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x26A4 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x171F );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2805 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2620 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2804 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2520 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2027 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0017 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1E25 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0020 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2117 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1028 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x051B );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1703 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2706 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1703 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1747 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2660 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x17AE );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2500 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x9027 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0026 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1828 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x002E );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2A28 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x081E );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0831 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1440 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x4014 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2020 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1410 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1034 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1400 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1014 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0020 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1400 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x4013 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1802 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1470 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x7004 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1470 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x7003 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1470 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x7017 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2002 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1400 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2002 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1400 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x5004 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1400 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2004 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x1400 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x5022 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0314 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0020 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0314 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x0050 );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2C2C );// SEQ_DATA_PORT
sensor_write_register( 0x3086, 0x2C2C );// SEQ_DATA_PORT
sensor_write_register( 0x309E, 0x0000 );// DCDS_PROG_START_ADDR
sensor_write_register( 0x30E4, 0x6372 );// ADC_BITS_6_7
sensor_write_register( 0x30E2, 0x7253 );// ADC_BITS_4_5
sensor_write_register( 0x30E0, 0x5470 );// ADC_BITS_2_3
sensor_write_register( 0x30E6, 0xC4CC );// ADC_CONFIG1
sensor_write_register( 0x30E8, 0x8050 );// ADC_CONFIG2
delay_ms(200); //ms
sensor_write_register( 0x3082, 0x0029 ); // OPERATION_MODE_CTRL
//AR0130 Rev1 Optimized settings
sensor_write_register( 0x301E, 0x00C8); // DATA_PEDESTAL
sensor_write_register( 0x3EDA, 0x0F03); // DAC_LD_14_15
sensor_write_register( 0x3EDE, 0xC005); // DAC_LD_18_19
sensor_write_register( 0x3ED8, 0x09EF); // DAC_LD_12_13
sensor_write_register( 0x3EE2, 0xA46B); // DAC_LD_22_23
sensor_write_register( 0x3EE0, 0x047D); // DAC_LD_20_21
sensor_write_register( 0x3EDC, 0x0070); // DAC_LD_16_17
sensor_write_register( 0x3044, 0x0404); // DARK_CONTROL
sensor_write_register( 0x3EE6, 0x8303); // DAC_LD_26_27
sensor_write_register( 0x3EE4, 0xD208); // DAC_LD_24_25
sensor_write_register( 0x3ED6, 0x00BD); // DAC_LD_10_11
sensor_write_register( 0x30B0, 0x1300); // DIGITAL_TEST
sensor_write_register( 0x30D4, 0xE007); // COLUMN_CORRECTION
sensor_write_register( 0x301A, 0x10DC); // RESET_REGISTER
delay_ms(500 );//ms
sensor_write_register( 0x301A, 0x10D8); // RESET_REGISTER
delay_ms(500); //ms
sensor_write_register( 0x3044, 0x0400); // DARK_CONTROL
sensor_write_register( 0x3012, 0x02A0); // COARSE_INTEGRATION_TIME
//720p 30fps Setup
sensor_write_register( 0x3032, 0x0000); // DIGITAL_BINNING
sensor_write_register( 0x3002, 0x0002); // Y_ADDR_START
sensor_write_register( 0x3004, 0x0000); // X_ADDR_START
sensor_write_register( 0x3006, 0x02D1);//Row End (A) = 721
sensor_write_register( 0x3008, 0x04FF);//Column End (A) = 1279
sensor_write_register( 0x300A, 0x02EA);//Frame Lines (A) = 746
sensor_write_register( 0x300C, 0x08ba);
sensor_write_register( 0x3012, 0x0133);//Coarse_IT_Time (A) = 307
sensor_write_register( 0x306e, 0x9211);//Coarse_IT_Time (A) = 307
//Enable Parallel Mode
sensor_write_register( 0x301A, 0x10D8); // RESET_REGISTER
sensor_write_register( 0x31D0, 0x0001); // HDR_COMP
//PLL Enabled 27Mhz to 50Mhz
sensor_write_register( 0x302A, 0x0009 );//VT_PIX_CLK_DIV = 9
sensor_write_register( 0x302C, 0x0001 );//VT_SYS_CLK_DIV = 1
sensor_write_register( 0x302E, 0x0003 );//PRE_PLL_CLK_DIV = 3
sensor_write_register( 0x3030, 0x0032 );//PLL_MULTIPLIER = 50
sensor_write_register( 0x30B0, 0x1300 ); // DIGITAL_TEST
delay_ms(100); //ms
sensor_write_register( 0x301A, 0x10DC ); // RESET_REGISTER
sensor_write_register( 0x301A, 0x10DC ); // RESET_REGISTER
//exposure
sensor_write_register( 0x3012, 0x0671 ); // COARSE_INTEGRATION_TIME
sensor_write_register( 0x30B0, 0x1330 ); // DIGITAL_TEST
sensor_write_register( 0x3056, 0x003B ); // GREEN1_GAIN
sensor_write_register( 0x305C, 0x003B ); // GREEN2_GAIN
sensor_write_register( 0x305A, 0x003B ); // RED_GAIN
sensor_write_register( 0x3058, 0x003B ); // BLUE_GAIN
//High Conversion gain
sensor_write_register( 0x3100, 0x0004 ); // AE_CTRL_REG
//LOAD= Disable Embedded Data and Stats
sensor_write_register(0x3064, 0x1802); // SMIA_TEST, EMBEDDED_STATS_EN, 0x0000
sensor_write_register(0x3064, 0x1802); // SMIA_TEST, EMBEDDED_DATA, 0x0000
sensor_write_register(0x30BA, 0x0008); //20120502
sensor_write_register(0x3EE4, 0xD308); //the default value former is 0xd208
sensor_write_register(0x301A, 0x10DC); // RESET_REGISTER
delay_ms(200); //DELAY= 200
printf("Aptina AR0130 sensor 720P30fps init success!\n");
}
有没有朋友提供一下,你们的AR0130的驱动代码,我比对一下。
我来回答
回答3个
时间排序
认可量排序
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
22014-11-10 14:44:18
-
2016-04-01 10:00:25
-
2015-12-09 16:06:28
-
2015-05-05 18:55:25
-
2017-06-21 15:59:45
-
2019-05-24 11:57:17
-
2020-09-28 16:33:48
-
2014-06-10 08:59:56
-
2019-09-10 11:05:35
-
2016-01-16 11:26:31
-
2020-06-12 13:52:19
-
2019-09-12 15:03:38
-
2016-06-14 23:57:07
-
2020-06-13 12:20:03
-
2015-11-10 09:57:52
-
2020-08-13 22:49:40
-
2016-04-22 13:29:55
-
2015-06-16 10:53:32
-
2016-11-11 17:06:25
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
5Hi3516CV610 如何使用SD卡升级固件
-
5cat /dev/logmpp 报错 <3>[ vi] [func]:vi_send_frame_node [line]:99 [info]:vi pic queue is full!
-
50如何获取vpss chn的图像修改后发送至vo
-
5FPGA通过Bt1120传YUV422数据过来,vi接收不到数据——3516dv500
-
50SS928 运行PQtools 拼接 推到设备里有一半画面会异常
-
53536AV100的sample_vdec输出到CVBS显示
-
10海思板子mpp怎么在vi阶段改变视频数据尺寸
-
10HI3559AV100 多摄像头同步模式
-
9海思ss928单路摄像头vio中加入opencv处理并显示
-
10EB-RV1126-BC-191板子运行自己编码的程序
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认