2384
- 收藏
- 点赞
- 分享
- 举报
3531A的输入时钟管脚复用请教
各位前辈,小弟用3531A接4路16bit bt1120 74Mhz的视频输入,原来的硬件接的是:
VI1_CLK/GPIO21_1/VI0_CLK,VI5_CLK/GPIO21_7/VI4_CLK,VI3_CLK/GPIO21_4/VI2_CLK,VI7_CLK/GPIO15_7/VI6_CLK的时钟脚,使用的vicap配置是SDK默认的配置
#VICAP
himm 0x120F0000 0x2;
himm 0x120F0024 0x2;
himm 0x120F0048 0x2; # 0:GPIO21_2 01:VI_ADC_REFCLK0 2:VI1_CLK
himm 0x120F004c 0x2;
himm 0x120F0070 0x2;
himm 0x120F0094 0x2; # 0:GPIO21_5 01:VI_ADC_REFCLK1 2:VI3_CLK
himm 0x120F0098 0x2;
himm 0x120F00bc 0x2;
himm 0x120F00E0 0x2; # 0:GPIO12_1 01:VI_ADC_REFCLK2 2:VI5_CLK
himm 0x120F00e4 0x2;
himm 0x120F0108 0x2;
himm 0x120F012C 0x2; # 0:GPIO20_6 01:VI_ADC_REFCLK3 2:VI7_CLK
就有图像输出了。
现在硬件接的是:
VI0_CLK/GPIO21_0/VI_ADC_REFCLK0,VI2_CLK/GPIO21_3/VI_ADC_REFCLK1,VI4_CLK/GPIO21_6/VI_ADC_REFCLK2,VI6_CLK/GPIO12_2/VI_ADC_REFCLK3这几个脚的时钟脚,按手册上说的是可以任意选择的。现在vicap的配置为
#VICAP
himm 0x120F0000 0x0;
himm 0x120F0024 0x2;
himm 0x120F0048 0x1; # 0:GPIO21_2 01:VI_ADC_REFCLK0 2:VI1_CLK
himm 0x120F004c 0x0;
himm 0x120F0070 0x2;
himm 0x120F0094 0x1; # 0:GPIO21_5 01:VI_ADC_REFCLK1 2:VI3_CLK
himm 0x120F0098 0x0;
himm 0x120F00bc 0x2;
himm 0x120F00E0 0x1; # 0:GPIO12_1 01:VI_ADC_REFCLK2 2:VI5_CLK
himm 0x120F00e4 0x0;
himm 0x120F0108 0x2;
himm 0x120F012C 0x1; # 0:GPIO20_6 01:VI_ADC_REFCLK3 2:VI7_CLK
,vi的配置代码为
[code]VI_DEV_ATTR_S stViDevAttr;
memset(&stViDevAttr, 0, sizeof(stViDevAttr));
/*interface mode*/
stViDevAttr.enIntfMode = VI_MODE_BT1120_STANDARD;
/*work mode, 1/2/4 multiplex*/
stViDevAttr.enWorkMode = VI_WORK_MODE_1Multiplex;
/* r_mask g_mask b_mask*/
stViDevAttr.au32CompMask[0] = 0xFF000000;
stViDevAttr.au32CompMask[1] = 0x00FF0000;
/* for single/double edge, must be set when double edge*/
stViDevAttr.enClkEdge = VI_CLK_EDGE_SINGLE_UP;
//stViDevAttr.enDataSeq = VI_INPUT_DATA_YVYU;
/*AdChnId*/
stViDevAttr.s32AdChnId[0] = -1;
stViDevAttr.s32AdChnId[1] = -1;
stViDevAttr.s32AdChnId[2] = -1;
stViDevAttr.s32AdChnId[3] = -1;
/*data type*/
stViDevAttr.bDataRev = HI_FALSE;[/code]
///////////////////////////////////////////////////////
[code]SIZE_S stTargetSize = { stSize.u32Width, stSize.u32Height };
RECT_S stCapRect = { 0, 0, stSize.u32Width, stSize.u32Height };
VI_CHN_ATTR_S stChnAttr;
memset(&stChnAttr, 0, sizeof(stChnAttr));
stChnAttr.stCapRect = stCapRect;
stChnAttr.stDestSize = stTargetSize;
stChnAttr.enCapSel = VI_CAPSEL_BOTH;
stChnAttr.enPixFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stChnAttr.bMirror = HI_FALSE;
stChnAttr.bFlip = HI_FALSE;
stChnAttr.s32SrcFrameRate = m_iSrcFrmRate; //原始帧率
stChnAttr.s32DstFrameRate = m_iDstFrmRate; //目标帧率
stChnAttr.enScanMode = VI_SCAN_PROGRESSIVE;[/code]
/proc/umap/vi的信息如下:
~ # cat /proc/umap/vi
[VIU] Version: [Hi3531A_MPP_V1.0.4.0 B030 Release], Build Time: [Jan 13 2017, 17:17:09]
-----MODULE PARAM--------------------------------------------------------------
detect_err_frame drop_err_frame stop_int_level max_cas_gap vi_vb_source
10 0 0 28000 0
-----VI DEV ATTR---------------------------------------------------------------
Dev IntfM WkM ComMsk0 ComMsk1 CLKM AD0 AD1 AD2 AD3 Seq DPath DType DRev bDllSlave
0 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
2 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
4 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
6 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
-----VI HIGH DEV ATTR---------------------------------------------------------------
Dev InputM WkM ComMsk0 ComMsk1 AD0 AD1 AD2 AD3 Seq CombM CompM ClkM Fix FldP DPath DType DRev
-----VI PHYCHN ATTR------------------------------------------------------------
PhyChn CapX CapY CapW CapH DstW DstH CapSel ScanM SkipM Mirror Flip IntEn PixFom SrcRat DstRat SkipMEx SkipMExYMask SkipMExCMask
0 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
8 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
16 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
24 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
-----VI PHYCHN MINOR ATTR------------------------------------------------------------
PhyChn CapX CapY CapW CapH DstW DstH CapSel ScanM Mirror Flip PixFom MixCap DwScal SrcRat DstRat
-----VI PHYCHN STATUS 1----------------------------------------------------------
PhyChn BindDev Way IntCnt VbFail LosInt TopLos BotLos BufCnt IntT SendT Field Stride
0 0 0 0 0 2 0 2 2 0 15 frm 1920
8 2 0 0 0 2 0 2 2 0 9 frm 1920
16 4 0 0 0 2 0 2 2 0 5 frm 1920
24 6 0 0 0 2 0 2 2 0 4 frm 1920
-----VI PHYCHN STATUS 2---------------------------------------------------------
PhyChn MaxIntT IntGapT MaxGapT OverCnt LIntCnt ThrCnt AutoDis CasAutD TmgErr ccErrN IntRat
0 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0
16 0 0 0 0 0 0 0 0 0 0 0
24 0 0 0 0 0 0 0 0 0 0 0
-----VI PHYCHN VBI ATTR---------------------------------------------------------
PhyChn VbiId X Y Local Len CasErrN
-----VI CASCADE CHN ATTR---------------------------------------------------------
CasChn Dev PhyChn SrcRat DstRat
-----USER PIC INFO-------------------------------------------------------------
UPicID Width Height Stride Field PixForm PoolID PhyAddr bUpdate
0 1920 1080 1920 intl sp420 0 4ac4a000 N
-----VI CHN STATUS-------------------------------------------------------------
ViChn bEnUsrP FrmTime FrmRate SendCnt SwLost Depth Rotate
0 Y 39991 30 87852 0 0 NONE
8 Y 39978 30 87852 0 0 NONE
16 Y 39970 30 87852 0 0 NONE
24 Y 39970 30 87852 0 0 NONE
-----VI CHN CALL VGS STATUS 1-------------------------------------------------
ViChn UsrBgnNOk UsrCancel UsrEndOk UsrCbOk CvrBgnNOk CvrCancel CvrEndOk CvrCbOk
-----VI CHN CALL VGS STATUS 2-------------------------------------------------
ViChn OsdBgnNOk OsdCancel OsdEndOk OsdCbOk ScaleNOk SclCancel SclEndOk SclCbOk
为什么没有中断?应该还有这么设置?
VI1_CLK/GPIO21_1/VI0_CLK,VI5_CLK/GPIO21_7/VI4_CLK,VI3_CLK/GPIO21_4/VI2_CLK,VI7_CLK/GPIO15_7/VI6_CLK的时钟脚,使用的vicap配置是SDK默认的配置
#VICAP
himm 0x120F0000 0x2;
himm 0x120F0024 0x2;
himm 0x120F0048 0x2; # 0:GPIO21_2 01:VI_ADC_REFCLK0 2:VI1_CLK
himm 0x120F004c 0x2;
himm 0x120F0070 0x2;
himm 0x120F0094 0x2; # 0:GPIO21_5 01:VI_ADC_REFCLK1 2:VI3_CLK
himm 0x120F0098 0x2;
himm 0x120F00bc 0x2;
himm 0x120F00E0 0x2; # 0:GPIO12_1 01:VI_ADC_REFCLK2 2:VI5_CLK
himm 0x120F00e4 0x2;
himm 0x120F0108 0x2;
himm 0x120F012C 0x2; # 0:GPIO20_6 01:VI_ADC_REFCLK3 2:VI7_CLK
就有图像输出了。
现在硬件接的是:
VI0_CLK/GPIO21_0/VI_ADC_REFCLK0,VI2_CLK/GPIO21_3/VI_ADC_REFCLK1,VI4_CLK/GPIO21_6/VI_ADC_REFCLK2,VI6_CLK/GPIO12_2/VI_ADC_REFCLK3这几个脚的时钟脚,按手册上说的是可以任意选择的。现在vicap的配置为
#VICAP
himm 0x120F0000 0x0;
himm 0x120F0024 0x2;
himm 0x120F0048 0x1; # 0:GPIO21_2 01:VI_ADC_REFCLK0 2:VI1_CLK
himm 0x120F004c 0x0;
himm 0x120F0070 0x2;
himm 0x120F0094 0x1; # 0:GPIO21_5 01:VI_ADC_REFCLK1 2:VI3_CLK
himm 0x120F0098 0x0;
himm 0x120F00bc 0x2;
himm 0x120F00E0 0x1; # 0:GPIO12_1 01:VI_ADC_REFCLK2 2:VI5_CLK
himm 0x120F00e4 0x0;
himm 0x120F0108 0x2;
himm 0x120F012C 0x1; # 0:GPIO20_6 01:VI_ADC_REFCLK3 2:VI7_CLK
,vi的配置代码为
[code]VI_DEV_ATTR_S stViDevAttr;
memset(&stViDevAttr, 0, sizeof(stViDevAttr));
/*interface mode*/
stViDevAttr.enIntfMode = VI_MODE_BT1120_STANDARD;
/*work mode, 1/2/4 multiplex*/
stViDevAttr.enWorkMode = VI_WORK_MODE_1Multiplex;
/* r_mask g_mask b_mask*/
stViDevAttr.au32CompMask[0] = 0xFF000000;
stViDevAttr.au32CompMask[1] = 0x00FF0000;
/* for single/double edge, must be set when double edge*/
stViDevAttr.enClkEdge = VI_CLK_EDGE_SINGLE_UP;
//stViDevAttr.enDataSeq = VI_INPUT_DATA_YVYU;
/*AdChnId*/
stViDevAttr.s32AdChnId[0] = -1;
stViDevAttr.s32AdChnId[1] = -1;
stViDevAttr.s32AdChnId[2] = -1;
stViDevAttr.s32AdChnId[3] = -1;
/*data type*/
stViDevAttr.bDataRev = HI_FALSE;[/code]
///////////////////////////////////////////////////////
[code]SIZE_S stTargetSize = { stSize.u32Width, stSize.u32Height };
RECT_S stCapRect = { 0, 0, stSize.u32Width, stSize.u32Height };
VI_CHN_ATTR_S stChnAttr;
memset(&stChnAttr, 0, sizeof(stChnAttr));
stChnAttr.stCapRect = stCapRect;
stChnAttr.stDestSize = stTargetSize;
stChnAttr.enCapSel = VI_CAPSEL_BOTH;
stChnAttr.enPixFormat = PIXEL_FORMAT_YUV_SEMIPLANAR_420;
stChnAttr.bMirror = HI_FALSE;
stChnAttr.bFlip = HI_FALSE;
stChnAttr.s32SrcFrameRate = m_iSrcFrmRate; //原始帧率
stChnAttr.s32DstFrameRate = m_iDstFrmRate; //目标帧率
stChnAttr.enScanMode = VI_SCAN_PROGRESSIVE;[/code]
/proc/umap/vi的信息如下:
~ # cat /proc/umap/vi
[VIU] Version: [Hi3531A_MPP_V1.0.4.0 B030 Release], Build Time: [Jan 13 2017, 17:17:09]
-----MODULE PARAM--------------------------------------------------------------
detect_err_frame drop_err_frame stop_int_level max_cas_gap vi_vb_source
10 0 0 28000 0
-----VI DEV ATTR---------------------------------------------------------------
Dev IntfM WkM ComMsk0 ComMsk1 CLKM AD0 AD1 AD2 AD3 Seq DPath DType DRev bDllSlave
0 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
2 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
4 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
6 BT1120S 1Mux ff000000 ff0000 UP -1 -1 -1 -1 UVUV ByPass YUV N Y
-----VI HIGH DEV ATTR---------------------------------------------------------------
Dev InputM WkM ComMsk0 ComMsk1 AD0 AD1 AD2 AD3 Seq CombM CompM ClkM Fix FldP DPath DType DRev
-----VI PHYCHN ATTR------------------------------------------------------------
PhyChn CapX CapY CapW CapH DstW DstH CapSel ScanM SkipM Mirror Flip IntEn PixFom SrcRat DstRat SkipMEx SkipMExYMask SkipMExCMask
0 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
8 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
16 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
24 0 0 1920 1080 1920 1080 both P SKIPNON N N Y sp420 30 30 N 0x0 0xa
-----VI PHYCHN MINOR ATTR------------------------------------------------------------
PhyChn CapX CapY CapW CapH DstW DstH CapSel ScanM Mirror Flip PixFom MixCap DwScal SrcRat DstRat
-----VI PHYCHN STATUS 1----------------------------------------------------------
PhyChn BindDev Way IntCnt VbFail LosInt TopLos BotLos BufCnt IntT SendT Field Stride
0 0 0 0 0 2 0 2 2 0 15 frm 1920
8 2 0 0 0 2 0 2 2 0 9 frm 1920
16 4 0 0 0 2 0 2 2 0 5 frm 1920
24 6 0 0 0 2 0 2 2 0 4 frm 1920
-----VI PHYCHN STATUS 2---------------------------------------------------------
PhyChn MaxIntT IntGapT MaxGapT OverCnt LIntCnt ThrCnt AutoDis CasAutD TmgErr ccErrN IntRat
0 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0
16 0 0 0 0 0 0 0 0 0 0 0
24 0 0 0 0 0 0 0 0 0 0 0
-----VI PHYCHN VBI ATTR---------------------------------------------------------
PhyChn VbiId X Y Local Len CasErrN
-----VI CASCADE CHN ATTR---------------------------------------------------------
CasChn Dev PhyChn SrcRat DstRat
-----USER PIC INFO-------------------------------------------------------------
UPicID Width Height Stride Field PixForm PoolID PhyAddr bUpdate
0 1920 1080 1920 intl sp420 0 4ac4a000 N
-----VI CHN STATUS-------------------------------------------------------------
ViChn bEnUsrP FrmTime FrmRate SendCnt SwLost Depth Rotate
0 Y 39991 30 87852 0 0 NONE
8 Y 39978 30 87852 0 0 NONE
16 Y 39970 30 87852 0 0 NONE
24 Y 39970 30 87852 0 0 NONE
-----VI CHN CALL VGS STATUS 1-------------------------------------------------
ViChn UsrBgnNOk UsrCancel UsrEndOk UsrCbOk CvrBgnNOk CvrCancel CvrEndOk CvrCbOk
-----VI CHN CALL VGS STATUS 2-------------------------------------------------
ViChn OsdBgnNOk OsdCancel OsdEndOk OsdCbOk ScaleNOk SclCancel SclEndOk SclCbOk
为什么没有中断?应该还有这么设置?
我来回答
回答5个
时间排序
认可量排序
认可0
认可0
认可0
认可0
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2018-01-29 18:36:15
-
2018-12-24 09:05:25
-
2019-05-29 18:10:54
-
2018-12-22 09:53:00
-
2017-12-14 15:26:38
-
2019-03-26 10:48:00
-
2019-05-30 13:51:09
-
2019-09-24 15:38:57
-
2018-12-28 16:18:38
-
2015-07-23 16:14:33
-
2019-12-20 10:26:16
-
2020-09-01 17:17:40
-
2023-08-31 09:17:30
-
2017-07-21 15:31:42
-
2019-12-17 15:30:53
-
2018-04-27 09:42:16
-
2016-09-09 12:32:00
-
2017-09-27 19:49:12
-
2020-10-23 18:22:26
无更多相似问答 去提问
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
悬赏问答
-
20帮忙交叉编译个源码
-
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处理并显示
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认