How to configure i.MX6Q to support camera parallel with greyscale 16-bit input data?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure i.MX6Q to support camera parallel with greyscale 16-bit input data?

1,199 Views
liamtien
Contributor I
  • According to iMX6-IPU.pdf, camera parallel supports grayscale 16-bit data input, but why IPUx_CSI0_SENS_CONF register's bit 10–8 (CSI0_SENS_DATA_FORMAT) doesn't support grayscale 16-bit data input?

    Table 37-2. Data Formats Supported By The Camera Port

    Gray scale 8 bits  Yes

    Gray scale 16 bits  Written to the MSB of a 16-bit word

     

    Data format from the sensor. This field defines the data format for the input of the CSI sensor.

    Values:

    000 full RGB or YUV444

    001 YUV422 (YUYV...)

    010 YUV422 (UYVY...)

    011 Bayer or Generic data

    100 RGB565

    101 RGB555

    110 RGB444

    111 JPEG

     

    37.4.3.9 16 bit camera support

    16 bit RGB as generic data

    In this mode the CSI receives 3 components per cycle. If the external device is 24bit -

    the user can get connect a 16 bit sample of it (such as RGB565) The CSI is

    programmed to accept the data as 16 bit generic data.

    When the data is read back from the memory for further processing

    in the IPU it will be read as 16 bit RGB data. The IDMAC's mapping unit will be used

    to remap the 16 bit data to the internal 24bpp RGB format

      I follows above description to configure it to "16 bit RGB as generic data" mode. In hardware, our FPGA connects i.MX6Q with 8 data pins. FPGA sends 1-byte greyscale data twice,  i.e 16-bit per pixel.

  • I am using Linux kernel v4.1.44, it is default to support YUYV format and can work.

  • The attached p0.jpg is the captured picture. The left is FPGA's original input picture, the right is i.MX6Q captures and saved picture.

  • The attached grey16.raw is the log file dumped from _ipu_ch_param_dump() which is called by ipu_init_channel_buffer() in ipu_common.c.

  • How to modify my drivers? any patch I can reference?  Thank a lot in advcance!

Labels (2)
0 Kudos
2 Replies

685 Views
igorpadykov
NXP Employee
NXP Employee

Hi liam

greyscale cameras are not supported in nxp bsps, 

however there are some posts covering some topics about raw capture:

IPU - bayer pattern conversion 
i.MX6Q MIPI CSI2: Capturing RAW12 generic data 
CSI -> IPU -> MEM retrieve 16 bits RAW DATA 
https://community.nxp.com/thread/319780 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

685 Views
liamtien
Contributor I

Hi igor:

   Thanks for your quick answer.

We just want to get the imtact greyscale 16-bit data, i.e. the data is complete and in its original value, "what the data input is what the data output". Doesn't need to modify the data by i.MX6Q. 

  I  change to CSI -> IPU -> MEM to retrieve greyscale 16-bit data, but it stops at _ipu_dp_dc_disable, as follows. By the way, we don't use LCD to display it. Thansk!

   In _ipu_dp_dc_disable
   In _ipu_dp_dc_disable: irq=451
   imx-ipuv3 2800000.ipu: DC stop timeout - 1 * 10ms
   imx-ipuv3 2800000.ipu: ipu busfreq high release.

0 Kudos