VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图

    Scheduled Pinned Locked Moved Jetson App Software
    18 Posts 2 Posters 6.6k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      Leibnitz
      last edited by

      (1)硬件条件
      NX mipi口线序见下图:
      5d3048cf-7b83-48ac-9679-5896eeacbb10-1724234262998_91E1ACE7-4C3B-4f24-8CCF-8AAAF331094A.png
      abced88a-d64f-4f1e-bbf9-1bdab604ae8d-1724234403550_9CE89054-045A-4173-84BD-05979D378C24.png
      因为NX MIPI接口与相机线序不同(刚好相反),使用转接板进行线序转接。

      (2)软件环境
      NX系统:ubuntu 20.04
      NX使用系统内核版本:# R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 1 19:57:35 UTC 2023
      jetpack版本:5.10.120-tegra
      RAW-MIPI-AR0234M驱动版本:nvidia_jetson_veye_bsp v1.29

      (3)问题描述
      ① 使用“nvidia_jetson_veye_bsp v1.29”源码编译支持4 lanes的“dbt”文件,编译生成了“egra194-p3668-all-p3509-0000.dtb”文件,将“egra194-p3668-all-p3509-0000.dtb”文件更新到NX板子上,相机无法采图,使用“./mv_mipi_i2c.sh -r -f maxfps -b 9”命令输出最大帧率60fps,如图:
      a94330cf-a028-4a8a-90af-e040226eddde-image.png

      ②具体编译过程见下图(修改所有的“bus-width”为4):
      716eb2ba-c376-4686-bd05-34a068334409-01f43c53f7f7065ea38428ddda1a4940.png

      并编译输出“egra194-p3668-all-p3509-0000.dtb”文件:
      84091eef-b0cf-4246-92a8-ced80af060da-32f0684677cbfd65bb3f751abef531d0.png

      ③ 将“egra194-p3668-all-p3509-0000.dtb”更新到NX板
      79cada08-f043-4358-8362-7648a0e76d6f-c8d5668ceb66ad10b9584c302fa95e68.png

      8c236942-259c-42b3-938a-295e9b9ef1c6-b6e009db55d8614f34603d3a72a507ad.png

      ④ 使用“./mv_mipi_i2c.sh -w -f lanenum -p1 4 -b 9”和“./mv_mipi_i2c.sh -w -f paramsave -b 9”命令设置相机并保存,然后板子及NX断电重启。

      53627899-722a-4095-acef-11bcee71a1bf-88a0a3f5121da24c7d9c19032d5ac16d.png

      使用“vlc”采集图一直没有图像:
      10a0c63f-2af2-42c1-9049-5c4a6373fa96-b7ef2c15198d65d100e8d754009fc6a8.png
      f574fead-ae5c-4eef-b2ca-6adfd0e706ff-image.png
      使用“v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1200,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1920x1200.raw
      ”一直卡住,输出的图像文件“y8-1920x1200.raw”大小为"0 kb"。

      疑问:在NX平台型下使用2 lane和4lane,都无法采集图,而使用i2c命令可以找到相机。
      43f4f8ac-ec4c-4519-a290-a39835fbd65c-image.png

      a7039abc-c62b-4230-8859-a65e6959c1a0-image.png

      742e9e25-b39a-48f7-9ac2-2183e7175909-image.png

      bf89b672-75f4-4305-b3b2-b155e6f812fe-image.png

      00715f78-20a6-4f61-a28c-b6cf6026cc09-image.png

      8a53eeab-0b83-49b4-a9dd-ed0b947697d5-image.png

      veye_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        veye_xumm @Leibnitz
        last edited by

        首先,第一个建议是先不要改代码,就用我们原有的dtb,调通2lane模式。

        其次,你问题中提到的一些小问题:

        • 1
          @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

        因为NX MIPI接口与相机线序不同(刚好相反),使用转接板进行线序转接。

        看不清楚你接插件的具体样子。这种情况不需要做转接板。FFC线用同面线或者异面线就能实现完全的信号反序。 当然,你用转接板也是可以的。

        • 2

        @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

        相机无法采图,使用“./mv_mipi_i2c.sh -r -f maxfps -b 9”命令输出最大帧率60fps,如图:

        写lanenum之后,读取出来确认一下。

        • 3

        @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

        使用“vlc”采集图一直没有图像:

        你现在这个阶段,建议先调通v4l2-ctl取图,然后再尝试vlc.

        • 4
          @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

        疑问:在NX平台型下使用2 lane和4lane,都无法采集图,而使用i2c命令可以找到相机。

        无法采图时,可以另起一个命令行终端,用sudo dmesg命令,看看有没有什么报错。

        • 5

        @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

        具体编译过程见下图(修改所有的“bus-width”为4):

        改成4lane,tegra194-camera-rbpcv2-veye_mvcam.dtsi中,除了bus-width,还有一个地方需要改。
        num_csi_lanes = <8>;

        • 6
          对于RAW-MIPI-AR0234M,需要使用下面这个路径下的dtsi来编译。
          ........\dts dtb\RAW-MIPI-AR0234M\

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

        L 4 Replies Last reply Reply Quote 0
        • L Offline
          Leibnitz @veye_xumm
          last edited by

          @veye_xumm
          2、使用“./mv_mipi_i2c.sh -r -f lanenum -b 9”确认输出为4 lanes,最大帧率120fps。
          5116f45e-200a-44fc-9afb-7a813233935a-image.png

          3、问题依然

          4、“v4l2-ctl”和“vlc”都试过,无法采集图像;“sudo dmesg”没有报错。
          ![0_1724295929072_798a4238-e846-4f5f-8620-c25bac101d92-image.png](Uploading 0%)
          9385315d-6e8c-4c72-923b-fb38d6af77f8-image.png
          5、指的将“num_csi_lanes = ”改为“num_csi_lanes = <8>”?

          6、是使用的........\dts dtb\RAW-MIPI-AR0234M\路径下的dtsi,但是自己编译的dtsi,并没有“RAW-MIPI-AR0234M”路径,有个疑问是我们自己编译的“dts”文件怎么就能确定是与“RAW-MIPI-AR0234M”匹配?在编译过程中并没有发现与““RAW-MIPI-AR0234M””绑定的相关操作

          1 Reply Last reply Reply Quote 0
          • L Offline
            Leibnitz @veye_xumm
            last edited by

            @veye_xumm 将“num_csi_lanes ”改为了8,进行从新编译:
            88999147-7aed-4a6d-89ac-8d10f74c07e2-image.png
            并将生成的“tegra194-p3668-all-p3509-0000-4lanes-v2.dtb”进行更新:
            f9b03e3a-c840-4196-b770-1d552fdb7f63-image.png

            cab6deb7-2103-439b-8a6a-ebead2792591-image.png

            并“sudo depmod”从启后,问题依然!!!

            1 Reply Last reply Reply Quote 0
            • L Offline
              Leibnitz @veye_xumm
              last edited by

              @veye_xumm 9db69d1a-621b-4bda-8867-0f6d29ddd856-image.png

              存的图依然的0 KB

              1 Reply Last reply Reply Quote 0
              • L Offline
                Leibnitz @veye_xumm
                last edited by

                @veye_xumm 还发现一个问题:
                使用“./mv_mipi_i2c.sh -w -f paramsave -b 9”保存参数后,相机断电重启后,参数又恢复为了默认参数。

                3e94f0e5-7157-4660-8bf8-46b211e37a73-image.png

                veye_xummV 1 Reply Last reply Reply Quote 0
                • veye_xummV Offline
                  veye_xumm @Leibnitz
                  last edited by veye_xumm

                  @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

                  @veye_xumm 还发现一个问题:
                  使用“./mv_mipi_i2c.sh -w -f paramsave -b 9”保存参数后,相机断电重启后,参数又恢复为了默认参数。

                  这个问题,建议你升级一下下面链接中v1.09版本。
                  https://www.mediafire.com/folder/dcdjecnkr7vj5/RAW-MIPI-AR0234M

                  升级方法参考这个:
                  https://wiki.veye.cc/index.php/Mvcam_firmware_update_manual


                  @leibnitz said in RAW-MIPI-AR0234M 在NX平台下,2lane和4 lanes都无法采图:

                  有个疑问是我们自己编译的“dts”文件怎么就能确定是与“RAW-MIPI-AR0234M”匹配?在编译过程中并没有发现与““RAW-MIPI-AR0234M””绑定的相关操作

                  看下面这个链接的part6.4:
                  https://wiki.veye.cc/index.php/VEYE_CS_Camera_source_for_Jetson/zh#.E7.BC.96.E8.AF.91_3
                  d826e34c-e298-41b0-ab30-c7d924cea3b3-image.png
                  这个文件,指的就是在dts dtb\RAW-MIPI-AR0234M目录下的对应文件。

                  我依然建议你先搞通2lane的。 如果你用你的底板搞不通,建议你用一下官方开发板的那个底板先。

                  Questions will be answered as soon as possible, please be patient.
                  如果你使用中文,请直接用中文提问。
                  May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                  L 1 Reply Last reply Reply Quote 0
                  • L Offline
                    Leibnitz @veye_xumm
                    last edited by

                    @veye_xumm 在2lanes模式下使用qv4l2可以正常采集到图像。但是采集了30多分钟,板子从启后,无法进入板子系统,且报下列错误:
                    3bd5972b-1861-4d24-a10c-9fe6753bc8a5-1b84710fb7fb31ff0d19cd505de4861d.jpg

                    veye_xummV 1 Reply Last reply Reply Quote 0
                    • veye_xummV Offline
                      veye_xumm @Leibnitz
                      last edited by

                      @leibnitz 这个错误跟你的现象没关系。这个是驱动加载的时候报的warning而已。如果断电重启之后系统进不去,可能你的系统已经坏掉了。

                      Questions will be answered as soon as possible, please be patient.
                      如果你使用中文,请直接用中文提问。
                      May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                      L 1 Reply Last reply Reply Quote 0
                      • L Offline
                        Leibnitz @veye_xumm
                        last edited by

                        @veye_xumm 这个问题已经解决。
                        2 lanes下可以采集图像,但是有1个问题(采集到的图像上面有固定的脏污,是因为sensor不洁净导致的吗?):
                        1c3d3c54-0d67-4714-82f9-f8ef2677fe5d-image.png

                        另外,可否提供4 lanes Jetson NX RAW-MIPI-AR0234m的驱动?

                        veye_xummV 1 Reply Last reply Reply Quote 0
                        • veye_xummV Offline
                          veye_xumm @Leibnitz
                          last edited by

                          @leibnitz
                          这个看起来像是sensor表面后者镜头面的脏。
                          sensor表面的话,可以用脱脂棉沾无水乙醇擦拭,进行清洁。

                          驱动的.c部分是不用修改的。 dtb按照之前你发的还有我给补充的两条,进行改动,应该就可以。

                          Questions will be answered as soon as possible, please be patient.
                          如果你使用中文,请直接用中文提问。
                          May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                          1 Reply Last reply Reply Quote 0
                          • L Offline
                            Leibnitz
                            last edited by

                            @veye_xumm
                            我们安装您的方法(修改“bus-width”为4;修改 “num_csi_lanes”为“8”),也将固件升级到1.09,
                            但是4 lanes依然只能找到相机,而无法采集到图像
                            c015e08d-1932-4f54-979b-01a052b7ad85-image.png

                            您们可否提供4 lanes的驱动(?我们目前相用它替换掉我们成熟产品里使用的AVT mipi相机。希望得到您们的支持)
                            我们的环境:
                            3bd7febd-a6b3-414a-ae61-b8448ae6d9d1-image.png

                            使用的硬件平台是:jetson Xavier NX

                            veye_xummV 1 Reply Last reply Reply Quote 0
                            • veye_xummV Offline
                              veye_xumm @Leibnitz
                              last edited by

                              @leibnitz 按照我的理解,现在这些改动应该就可以调通。
                              不过我这只有nVidia的开发板,是2lane的,没办法调试。
                              方不方便把你的板子寄给我,直接用你的板子调试一下?

                              Questions will be answered as soon as possible, please be patient.
                              如果你使用中文,请直接用中文提问。
                              May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                              L 2 Replies Last reply Reply Quote 0
                              • L Offline
                                Leibnitz @veye_xumm
                                last edited by

                                @veye_xumm 好的 留一个您的收件地址和联系方式。

                                1 Reply Last reply Reply Quote 0
                                • L Offline
                                  Leibnitz @veye_xumm
                                  last edited by

                                  @veye_xumm
                                  f5fd9e37-a9ad-429e-9c09-1c4625822f73-image.png

                                  4lane模式下有图了,相机也设置成了4 lanes,dtbs也是更换成了4 lanes的驱动,但是采集帧率缺还是60 fps,请问是哪里设置的不对吗?

                                  veye_xummV 1 Reply Last reply Reply Quote 0
                                  • veye_xummV Offline
                                    veye_xumm @Leibnitz
                                    last edited by

                                    @leibnitz
                                    你现在fps配置的是60啊~ 配成120就行了。

                                    Questions will be answered as soon as possible, please be patient.
                                    如果你使用中文,请直接用中文提问。
                                    May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                                    L 1 Reply Last reply Reply Quote 0
                                    • L Offline
                                      Leibnitz @veye_xumm
                                      last edited by

                                      @veye_xumm

                                      显示使用qvl2看到的帧率只有几帧,没有120fps。
                                      4acd0262-2f38-4c67-a046-e8dc1911aeae-1724410110079_DB406570-99EB-45c6-A673-6A3D4D5589BE.png

                                      fb4fbee2-0ce4-42d8-a6cd-b3749a6e2299-image.png

                                      veye_xummV 1 Reply Last reply Reply Quote 0
                                      • veye_xummV Offline
                                        veye_xumm @Leibnitz
                                        last edited by

                                        @leibnitz
                                        是的,qv4l2拿到图像,进行转码,搬移,预览,做了很多工作。整个pipeline的冗长和软件效率的问题导致预览无法达到相机的输出能力。

                                        用下面https://wiki.veye.cc/index.php/Mv_series_camera_appnotes_4_jetson/zh#.E5.B8.A7.E7.8E.87.E7.BB.9F.E8.AE.A1
                                        7.3.2 帧率统计
                                        的命令来统计一下实际相机输出的帧率。

                                        Questions will be answered as soon as possible, please be patient.
                                        如果你使用中文,请直接用中文提问。
                                        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

                                        1 Reply Last reply Reply Quote 0

                                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                        With your input, this post could be even better 💗

                                        Register Login
                                        • First post
                                          Last post