首页问答详情

海思HI3519AV100适配imx283,MIPI有中断,VI pipe层帧全部丢弃

¥ 100
已结题
逍遙嘆421799821
逍遙嘆421799821  发布于  2022-01-12 09:15:05
采纳率 0%
1个问答

使用飞凌主板OK3519A-C(芯片hi3519av100)连接 索尼IMX283CQJ-C sensor,编写测试程序text_imx283.c(参考附件)运行在主板侧,使用脚本配置sensor模式为mode 2a。

mipi rx 调试信息打印:

  1. ~ # cat /proc/umap/mipi_rx
  2. Module: [MIPI_RX], Build Time[Sep 3 2020, 04:39:11]
  3. -----MIPI LANE DIVIDE MODE---------------------------------------------------------------------------------------------
  4. MODE LANE DIVIDE
  5. 1 8+4
  6. -----MIPI DEV ATTR-----------------------------------------------------------------------------------------------------
  7. Devno WorkMode DataRate DataType WDRMode ImgX ImgY ImgW ImgH
  8. 3 MIPI X1 RAW12 None 0 0 2748 1556
  9. -----MIPI LANE INFO-----------------------------------------------------------------------------------------------------
  10. Devno LaneID
  11. 3 8, 9, 10, 11, -1, -1, -1, -1
  12. -----MIPI PHY DATA INFO------------------------------------------------------
  13. PhyId LaneId PhyData MipiData LvdsData
  14. 0 0, 1, 2, 3 0x00,0x00,0x00,0x00 0x00,0x00,0x00,0x00 0x00,0x00,0x00,0x00
  15. 1 4, 5, 6, 7 0x00,0x00,0x00,0x00 0x00,0x00,0x00,0x00 0x00,0x00,0x00,0x00
  16. 2 8, 9,10,11 0x5c,0xe6,0x60,0x26 0x43,0x31,0x53,0x37 0x1b,0xc3,0x3e,0xc0
  17. -----MIPI DETECT INFO----------------------------------------------------
  18. Devno VC width height
  19. 3 0 2748 1556
  20. 3 1 0 0
  21. 3 2 0 0
  22. 3 3 0 0
  23. -----PHY CIL ERR INT INFO---------------------------------------------
  24. PhyId Clk2TmOut ClkTmOut Lane0TmOut Lane1TmOut Lane2TmOut Lane3TmOut Clk2Esc ClkEsc Lane0Esc Lane1Esc Lane2Esc Lane3Esc
  25. 0 0 0 0 0 0 0 0 0 0 0 0 0
  26. 1 0 0 0 0 0 0 0 0 0 0 0 0
  27. 2 0 0 0 0 0 0 0 0 0 0 0 0
  28. -----MIPI ERROR INT INFO 1-----------------------------------------------------------
  29. Devno Ecc2 Vc0CRC Vc1CRC Vc2CRC Vc3CRC Vc0EccCorrct Vc1EccCorrct Vc2EccCorrct Vc3EccCorrct
  30. 3 0 0 0 0 0 0 0 0 0
  31. -----MIPI ERROR INT INFO 2-----------------------------------------------------------
  32. Devno Vc0Dt Vc1Dt Vc2Dt Vc3Dt Vc0FrmCrc Vc1FrmCrc Vc2FrmCrc Vc3FrmCrc
  33. 3 0 0 0 0 0 0 0 0
  34. -----MIPI ERROR INT INFO 3-----------------------------------------------------------
  35. Devno Vc0FrmSeq Vc1FrmSeq Vc2FrmSeq Vc3FrmSeq Vc0BndryMt Vc1BndryMt Vc2BndryMt Vc3BndryMt
  36. 3 0 0 0 0 0 0 0 0
  37. -----MIPI ERROR INT INFO 4-----------------------------------------------------------
  38. Devno DataFifoRdErr CmdFifoRdErr Vsync CmdFifoWrErr DataFifoWrErr
  39. 3 0 0 0 0 0
  40. -----ALIGN ERROR INT INFO--------------------------------------
  41. Devno FIFO_FullErr Lane0Err Lane1Err Lane2Err Lane3Err Lane4Err Lane5Err Lane6Err Lane7Err Lane8Err Lane9Err Lane10Err Lane11Err
  42. 3 0 0 0 0 0 0 0 0 0 0 0 0 0

vi 调试信息打印

  1. ~ # cat /proc/umap/vi
  2. [VI] Version: [Hi3519AV100_MPP_V2.0.2.0 B050 Release], Build Time[Aug 2 2019, 17:42:54]
  3. -------------------------------MODULE PARAM ---------------------------------------------------------------------------
  4. DetectErrFrame DropErrFrame VbSource
  5. 0 0 Common
  6. -------------------------------VI MODE --------------------------------------------------------------------------------
  7. Pipe0Mode Pipe1Mode Pipe2Mode Pipe3Mode Pipe4Mode Pipe5Mode
  8. offline offline offline offline offline offline
  9. -------------------------------VPSS MODE ------------------------------------------------------------------------------
  10. Pipe0Mode Pipe1Mode Pipe2Mode Pipe3Mode Pipe4Mode Pipe5Mode
  11. offline offline offline offline offline offline
  12. -------------------------------VI STITCH GRP ATTR----------------------------------------------------------------------
  13. StitchGrp bStitch Mode MaxPTSGap PipeNum PipeId
  14. -------------------------------VI DEV ATTR1----------------------------------------------------------------------------
  15. DevID DevEn BindPipe Width Height IntfM WkM ComMsk0 ComMsk1 ScanM
  16. 3 Y Y 2748 1556 MIPI 1Mux fff00000 0 P
  17. -------------------------------VI DEV ATTR2----------------------------------------------------------------------------
  18. DevID AD0 AD1 AD2 AD3 Seq DataType DataRev BasW BasH HReph VReph WDRMode CacheLine DataRate
  19. 3 -1 -1 -1 -1 N/A RGB N 2748 1556 NONE NONE None 1556 X1
  20. -------------------------------VI BIND ATTR----------------------------------------------------------------------------
  21. DevID PipeNum PipeId
  22. 3 1 0
  23. -------------------------------VI DEV TIMING ATTR----------------------------------------------------------------------
  24. DevID DevTimingEn DevFrmRate DevWidth DevHeight
  25. -------------------------------VI PIPE ATTR1---------------------------------------------------------------------------
  26. PipeID BypassMode YuvSkip IspBypass Width Height PixFmt BitWidth NrEn SharpenEn CompressMode
  27. 0 BypassNone N N 2748 1556 RAW12 12 N N None
  28. -------------------------------VI PIPE ATTR2---------------------------------------------------------------------------
  29. DiscProPic SrcFRate DstFRate FrameSource RepeatMode VCNum IntType EarlyLine VbPoolId
  30. N -1 -1 DEV NONE 0 START 0 -1
  31. -------------------------------VI PIPE CROP ATTR-----------------------------------------------------------------------
  32. PipeID CropEn CoorX CoorY Width Height
  33. -------------------------------VI PIPE NR ATTR-------------------------------------------------------------------------
  34. PipeID BitWidth CompressMode PixFmt RefSrc Intf Version OptMode
  35. -------------------------------VI PIPE USER PIC ATTR-------------------------------------------------------------------
  36. PipeID Enable ChnID Mode BgColor PicID Width Height Stride PixFmt PoolID PhyAddr
  37. -------------------------------VI PIPE DUMP ATTR-----------------------------------------------------------------------
  38. PipeID Enable Depth DumpType
  39. -------------------------------VI PIPE BNR DUMP ATTR-------------------------------------------------------------------
  40. PipeID Enable Depth
  41. -------------------------------VI CHN ATTR1----------------------------------------------------------------------------
  42. PipeID ChnID Width Height Mirror Flip SrcFRate DstFRate PixFmt VideoFmt DynamicRange
  43. 0 0 1920 1080 N N -1 -1 SP420 LINEAR SDR8
  44. -------------------------------VI CHN ATTR2----------------------------------------------------------------------------
  45. CompressMode Depth Align VbPoolId
  46. None 0 0 -1
  47. -------------------------------VI EXTCHN ATTR1-------------------------------------------------------------------------
  48. PipeID ChnID Source SrcChn Width Height SrcFRate DstFRate PixFmt DynamicRange CompressMode Depth
  49. -------------------------------VI EXTCHN ATTR2-------------------------------------------------------------------------
  50. Align VbPoolId
  51. -------------------------------VI CHN EARLY INTERRUPT INFO-------------------------------------------------------------
  52. PipeID ChnID Enable LineCnt
  53. 0 0 N 0
  54. -------------------------------VI CHN LOW DELAY ATTR-------------------------------------------------------------------
  55. PipeID ChnID Enable LineCnt Effect
  56. 0 0 N 0 N
  57. -------------------------------VI CHN CROP INFO------------------------------------------------------------------------
  58. PipeID ChnID CropEn CoorType CoorX CoorY Width Height TrimX TrimY TrimWid TrimHgt
  59. 0 0 N RIT 0 0 0 0 0 0 0 0
  60. -------------------------------VI CHN ROTATION INFO--------------------------------------------------------------------
  61. PipeID ChnID Rotation
  62. 0 0 0
  63. -------------------------------VI CHN LDC INFO-------------------------------------------------------------------------
  64. PipeID ChnID Enable Aspect XRatio YRatio XYRatio XOffset YOffset DistortionRatio
  65. 0 0 N N 0 0 0 0 0 0
  66. -------------------------------VI CHN LDCV2 INFO-------------------------------------------------------------------------
  67. -------------------------------VI CHN ROTATIO_EX INFO------------------------------------------------------------------
  68. PipeID ChnID Enable ViewType Angle XOffset YOffset Width Height
  69. 0 0 N ALL 0 0 0 0 0
  70. -------------------------------VI CHN SPREAD INFO----------------------------------------------------------------------
  71. PipeID ChnID Enable OutW OutH Coef
  72. 0 0 N 0 0 0
  73. -------------------------------VI EXTCHN FISHEYE ATTR------------------------------------------------------------------
  74. PipeID ChnID Enable MntMode RgnNum BgEnable BgColor LMF HOffset VOffset TCoef FStrength
  75. -------------------------------VI EXTCHN FISHEYE REGION ATTR-----------------------------------------------------------
  76. PipeID ChnID RgnIndex ViewMode InRadius OutRadius Pan Tilt HorZoom VerZoom OutX OutY OutW OutH
  77. -------------------------------VI DIS CONFIG INFO1---------------------------------------------------------------------
  78. PipeID ChnID Mode Motion PdtType BufNum CropRatio FrmRate GyroRange GyroBitWidth CamSteady Scale
  79. -------------------------------VI DIS ATTR INFO------------------------------------------------------------------------
  80. PipeID ChnID DisChn Enable GdcBypass MovSub Roef Timelag ViewAngle bStillCrop HorLimit VerLimit Strength
  81. -------------------------------ISP 2DofDIS INFO------------------------------------------------------------------------
  82. PipeID Enable
  83. 0 N
  84. -------------------------------VI SNAP ATTR INFO-----------------------------------------------------------------------
  85. PipeID Type bLoadCCM FrameCnt rptTimes bZSL FrmDepth RollbaskMs Interval
  86. -------------------------------VI SNAP STATUS INFO---------------------------------------------------------------------
  87. Status bDoublePipe VideoPipe SnapPipe VcNum ProDelayInt
  88. -------------------------------VI CHN OUTPUT RESOLUTION----------------------------------------------------------------
  89. PipeID ChnID Enable Mirror Flip Width Height PixFmt VideoFmt DynamicRange CompressMode FrameRate
  90. 0 0 Y N N 0 0 SP420 LINEAR SDR8 None 0
  91. -------------------------------VI PIPE STATUS--------------------------------------------------------------------------
  92. PipeID Enable IntCnt FrameRate LostFrame VbFail Width Height
  93. 0 Y 2277 0 2275 0 2748 1556
  94. -------------------------------VI CHN STATUS---------------------------------------------------------------------------
  95. PipeID ChnID Enable FrameRate LostFrame VbFail Width Height
  96. 0 0 Y 0 0 0 0 0
  97. -------------------------------VI PIPE Statistic-----------------------------------------------------------------------
  98. PipeID RecvPic LostCnt BufCnt CurSoftTm MaxSoftTm CurTaskTm MaxTaskTm LowBandWidth BeBufNum
  99. 0 0 0 0 0 0 0 0 0 0
  100. -------------------------------VI HW STATISTIC-------------------------------------------------------------------------
  101. ProcIdx HWCostTm MaxHWCostTm CycleCnt MaxCycleCnt
  102. 0 0 0 0 0
  103. -------------------------------VI PROC OFFLINE IRQ STATISTIC----------------------------------------------------------
  104. ProcIdx SubmitCnt IntCnt ListCnt TmOutCnt BusErrCnt DcmpErrCnt StartErrCnt NodeIdErrCnt
  105. 0 0 0 0 0 0 0 0 0
  106. -------------------------------VI PROC ONLINE IRQ STATISTIC-----------------------------------------------------------
  107. ProcIdx IntCnt FrmStartCnt FrmErrCnt FrmFlowCnt BusErrCnt DcmpErrCnt CfgLossCnt FirstIntPts
  108. 0 0 0 0 0 0 0 0 0
  109. -------------------------------VI PROC COST TIME STATISTIC-----------------------------------------------------------
  110. ProcIdx IntCntPerSec MaxIntCntPerSec CurIntCostTm MaxIntCostTm TotalIntCostTm IntTmPerSec MaxIntTmPerSec
  111. 0 0 0 0 0 0 0 0
  112. -------------------------------VI DEV DETECT INFO----------------------------------------------------------------------
  113. DevID ValidWidth ValidHeight TotalWidth
  114. 3 2748 1556 12419
  115. -------------------------------VI BAS DETECT INFO----------------------------------------------------------------------
  116. DevID ValidWidth ValidHeight TotalWidth
  117. -------------------------------VI ISP DETECT INFO----------------------------------------------------------------------
  118. ISPID ValidWidth ValidHeight TotalWidth
  119. 0 2748 1556 12419
  120. ~ #

VI调试打印显示所有的帧被丢弃,通过具体的错误日志查看:

  1. ~ # cat /dev/logmpp
  2. 3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .
  3. <3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .
  4. <3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .
  5. <3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .
  6. <3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .
  7. <3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .
  8. <3>[ vi] [func]:vi_drv_cap_is_wrong_int [line]:10676 [info]:pipe:0 err intterupt status:0x11 !! EOF:0 BUFOVF:0 DATATHROW:0 .

VI DEV属性配置为:

  1. static VI_DEV_ATTR_S DEV_ATTR_IMX283_BASE =
  2. {
  3. VI_MODE_MIPI,
  4. VI_WORK_MODE_1Multiplex,
  5. {0xfff00000, 0x00},
  6. VI_SCAN_PROGRESSIVE,
  7. {-1, -1, -1, -1},
  8. VI_DATA_SEQ_BUTT,
  9. {
  10. /* port_vsync port_vsync_neg port_hsync port_hsync_neg */
  11. VI_VSYNC_FIELD,
  12. VI_VSYNC_NEG_LOW,
  13. VI_HSYNC_PULSE,
  14. VI_HSYNC_NEG_HIGH,
  15. VI_VSYNC_NORM_PULSE,
  16. VI_VSYNC_VALID_NEG_HIGH,
  17. /*hsync_hfb hsync_act hsync_hhb*/
  18. {0, 2748, 0,
  19. /*vsync0_vhb vsync0_act vsync0_hhb*/
  20. 0, 1556, 0,
  21. /*vsync1_vhb vsync1_act vsync1_hhb*/
  22. 0, 0, 0}
  23. },
  24. VI_DATA_TYPE_RGB,
  25. HI_FALSE,
  26. {2748, 1556},
  27. {
  28. {
  29. {2748, 1556},
  30. },
  31. {
  32. VI_REPHASE_MODE_NONE,
  33. VI_REPHASE_MODE_NONE
  34. }
  35. },
  36. {
  37. WDR_MODE_NONE,
  38. 1556
  39. },
  40. DATA_RATE_X1
  41. };

有哪位大佬是配过imx283 sensor,帮忙解答一下,不知道问题出现在什么地方

我来回答
3337
0
0
回答
4个
吹尽浮沙 发布于2022-01-12 11:47:09

channel 属性应该改成摄像头分辨率2748*1556,不是1080p

0
逍遙嘆421799821   回复   吹尽浮沙   2022-01-12 20:10:53

根据海思的MPP手册,vi channel是具有裁剪功能的,所以应该会自动裁剪。
按照你的思路修改了一下,由于mpp限制分辨率必须是8的倍数,改成了2748*1568,但是问题仍然存在

-------------------------------VI CHN ATTR1----------------------------------------------------------------------------
  PipeID   ChnID   Width    Height    Mirror    Flip    SrcFRate    DstFRate    PixFmt      VideoFmt  DynamicRange
       0       0    2748      1568         N       N          -1          -1     SP420        LINEAR          SDR8

另外我贴一下sensor的模式分辨率:

还有vi channel的配置:

static VI_CHN_ATTR_S CHN_ATTR_1920x1080_420_SDR8_LINEAR =
{
    {2748, 1568},
    PIXEL_FORMAT_YVU_SEMIPLANAR_420,
    DYNAMIC_RANGE_SDR8,
    VIDEO_FORMAT_LINEAR,
    COMPRESS_MODE_NONE,
    0,      0,
    0,
    { -1, -1}
};
0
Vance 发布于2022-01-12 17:33:44
海思,联咏方案商,玩视觉15年,熟悉各种视频SOC。Wechat:zhanxy8

你们是做航拍的吗?你这个问题比较复杂,需要深入交流才行

0
逍遙嘆421799821   回复   Vance   2022-01-12 20:13:28

不是做航拍的,公司规划做拍照业务,需要针对图像进行处理功能,自己做sensor,目前使用IMX283这款芯片做sensor调试。我加一下你的微信,深入聊一聊~

0
逍遙嘆421799821 发布于2022-01-17 11:34:00

已经解决了,后续定位发现,由于bIspBypass必须设置HI_FALSE, 需要通过ISP进行处理,ISP功能在代码中没开启,导致丢帧。

2

Markdown 语法

  • 加粗 **内容**
  • 斜体 *内容*
  • 删除线 ~~内容~~
  • 引用 > 引用内容
  • 代码 `代码`
  • 代码块 ```编程语言↵代码```
  • 链接 [链接标题](url)
  • 无序列表 - 内容
  • 有序列表 1. 内容
  • 缩进 内容
  • 图片 ![alt](url)

Markdown 语法

  • 加粗 **内容**
  • 斜体 *内容*
  • 删除线 ~~内容~~
  • 引用 > 引用内容
  • 代码 `代码`
  • 代码块 ```编程语言↵代码```
  • 链接 [链接标题](url)
  • 无序列表 - 内容
  • 有序列表 1. 内容
  • 缩进 内容
  • 图片 ![alt](url)
+ 添加网盘链接/附件
或将文件直接拖到这里
悬赏:
EBC
网盘
* 网盘链接:
* 提取码:
悬赏:
EBC
Loading...
易百纳技术社区
确定要删除此文章、专栏、评论吗?
确定
取消
易百纳技术社区
在专栏模块发布专栏,可获得其他E友的打赏
回答悬赏问答,被题主采纳后即可获得悬赏金
在上传资料时,有价值的资料可设置为付费资源
达到一定金额,收益即可提现~
收益也可用来充值ebc,下载资料、兑换礼品更容易
活动规则
  • 1.周任务为周期性任务,每周周一00:00刷新,上周完成的任务不会累计到本周,本周需要从头开始任务,当前任务完成后才可以完成下一个任务
  • 2.发布的专栏与资料需要与平台的板块有相关性,禁止注水,专栏/资料任务以审核通过的篇数为准
  • 3.任务完成后,现金奖励直接打款到微信账户;EBC/收益将自动发放到个人账户,可前往“我的钱包”查看;其他奖励请联系客服兑换
  • 4.每周最后三个任务将会有以下奖品掉落:社区热卖开发板、小米音响、视频年度会员、京东卡、华为手机等等