<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: MIPI-CSI bridge</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1534725#M196152</link>
    <description>&lt;P&gt;We see the same issue using our custom camera and 1080p30, but only for the first frame. This produces a permanent shift in the video frames as the data remains misaligned and we can't find a way to align it.&lt;/P&gt;&lt;P&gt;What is your FCC setting? Could this be causing the data loss (it flushes the RXFIFO on SOF).&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;configured to switch buffer after a MIPI End Of Frame&lt;BR /&gt;what setting did you use for this?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Oct 2022 09:01:46 GMT</pubDate>
    <dc:creator>SJZ</dc:creator>
    <dc:date>2022-10-10T09:01:46Z</dc:date>
    <item>
      <title>MIPI-CSI bridge</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1286833#M174983</link>
      <description>&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;we would like to interface a camera sensor which is compliant with MIPI-CSI2 using variable frame size and fixed frame period.&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;The application has allocated large buffers to match the worst case ie. the largest MIPI frame size within the frame period.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;MIPI CSI Bridge is configured:&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;UL&gt;&lt;LI&gt;to swap buffers according to VSYNC&lt;SPAN&gt;, BASEADDR_SWITCH_EN&lt;/SPAN&gt; is set and &lt;SPAN&gt;BASEADDR_SWITCH_SE&lt;/SPAN&gt;L is cleared.&lt;/LI&gt;&lt;LI&gt;to raise an interrupt when SOF is detected,&lt;SPAN&gt; SOF_INTEN&lt;/SPAN&gt; is set&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;We control how many bytes the sensor sends in a frame.&lt;BR /&gt;We can determine the frame size in the memory buffer. In other word, how many data have been transferred by the DMA in the memory buffer.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;We observe an Interrupt rate corresponding to the frame period which is good.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;We observe that ~128B have not been transferred by the DMA. In other word, length of the received frame is smaller (~128B ) than the number of data sent by the sensor.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;It seems that the last transfer from the RX buffer to the memory buffer has not been done.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;We tried to set&amp;nbsp; &lt;SPAN&gt;RxFF_LEVEL&lt;/SPAN&gt; to 0 (16 double word-&amp;gt;4 double word) but data are corrupted.&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;Is there a way to trigger the DMA to achieve the last transfer?&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P class="x_MsoNormal"&gt;Best regards,&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Jun 2021 12:46:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1286833#M174983</guid>
      <dc:creator>PSEE</dc:creator>
      <dc:date>2021-06-03T12:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: MIPI-CSI bridge</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1294859#M175720</link>
      <description>&lt;P&gt;Which version of BSP are you using?&lt;/P&gt;
&lt;P&gt;Which chip are you using? What is the part number?&lt;/P&gt;
&lt;P&gt;Are you using the EVK board?&lt;/P&gt;
&lt;P&gt;Could you tell me how to reproduce the issue on the EVK board?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 17:03:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1294859#M175720</guid>
      <dc:creator>jimmychan</dc:creator>
      <dc:date>2021-06-18T17:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: MIPI-CSI bridge</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1295338#M175777</link>
      <description>&lt;P&gt;The board is an imx8mmevk-bb.&lt;/P&gt;&lt;P&gt;Please find below a photo of the device:&lt;/P&gt;&lt;P&gt;MIMX8MM6DVTLZAA&lt;BR /&gt;QN87W&lt;BR /&gt;SBBU1924A&lt;/P&gt;&lt;P&gt;&amp;nbsp;The key point is that our Event BAsed camera is using MIPI variable frame size. The camera can produce some frames with few bytes and other with mega bytes of data. 16 or 32-bits pixels do not comply with standart camera format as carry event information.&lt;/P&gt;&lt;P&gt;We have modified the drivers/media/platform/mxc/capture/mx6s_capture.c file:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Instead of enabling &lt;FONT color="#000000"&gt;BIT_FB&lt;/FONT&gt;&lt;FONT color="#000000"&gt;0/1&lt;/FONT&gt;&lt;FONT color="#000000"&gt;_DMA_DONE_INTEN, we enable &lt;/FONT&gt;&lt;FONT color="#0000ff"&gt;BIT_SOF_INTEN and we have changed the interrupt handler accordingly.&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;We have added instructions to align physical buffers on double word boundaries&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;We have configured the IP to swap buffers after each start of frame&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;We set to 0 the DMA buffers before enquing them. We know the size of the frame sent by our sensor.&lt;BR /&gt;=&amp;gt; We observe that ~128Bytes are missing at the end of the frames received.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It seems that some RX buffers are not flushed in the MIPI-CSI and the MIPI-bridge or the last DMA burst has not been executed.&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;we observe this for every frame&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;we tried to play with different config in particular the size of the DMA burst but we did not observe any changes&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Please tell us if you want us to try different configurations. I join the 2 files modified in plain text and as a patch to highlight our modifications.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 09:26:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1295338#M175777</guid>
      <dc:creator>PSEE</dc:creator>
      <dc:date>2021-06-21T09:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: MIPI-CSI bridge</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1314399#M177574</link>
      <description>&lt;P&gt;When the MIPI-CSI interface is configured to switch buffer after a MIPI End Of Frame, the last DMA transfer does not seem to be executed in all cases before the data are reset in the RxFIFO when an End Of Frame short packet is detected.&lt;/P&gt;&lt;P&gt;According to the TRM, a DMA burst transfer is triggered when a certain amount of data is available in a small RxFIFO. The number of bytes required is configurable in the RxFF_LEVEL field of the CSI_CR3. The minimum burst size is 4 double word (32 bytes) which correspond to the missing data at the end of the frame.&lt;/P&gt;&lt;P&gt;We suspect that when the frame size is variable and is not a multiple of 4 double words, the last DMA burst transfer is not executed and data are lost.&lt;/P&gt;&lt;P&gt;Please could you confirm?&lt;/P&gt;&lt;P&gt;Is there a workaround?&amp;nbsp; (This behavior shall also be observed with JPEG cameras.)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 08:32:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1314399#M177574</guid>
      <dc:creator>PSEE</dc:creator>
      <dc:date>2021-07-28T08:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: MIPI-CSI bridge</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1497376#M193169</link>
      <description>&lt;P&gt;Did you resolve this?&lt;BR /&gt;Did you look at register settings for LAST_DMQ_REQ_SEL, BASE-ADDR_SWITCH,&amp;nbsp;RxFF_LEVEL,&amp;nbsp;DMA_BURST_TYPE_RFF,&amp;nbsp;LINE_STRIDE_EN ?&lt;BR /&gt;If you use a frame size of 720x487 did that help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 14:18:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1497376#M193169</guid>
      <dc:creator>SJZ</dc:creator>
      <dc:date>2022-07-28T14:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: MIPI-CSI bridge</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1534725#M196152</link>
      <description>&lt;P&gt;We see the same issue using our custom camera and 1080p30, but only for the first frame. This produces a permanent shift in the video frames as the data remains misaligned and we can't find a way to align it.&lt;/P&gt;&lt;P&gt;What is your FCC setting? Could this be causing the data loss (it flushes the RXFIFO on SOF).&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;configured to switch buffer after a MIPI End Of Frame&lt;BR /&gt;what setting did you use for this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 09:01:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIPI-CSI-bridge/m-p/1534725#M196152</guid>
      <dc:creator>SJZ</dc:creator>
      <dc:date>2022-10-10T09:01:46Z</dc:date>
    </item>
  </channel>
</rss>

