The CRU supports interfacing with external cameras by accepting data signals in order to capture incoming data
This module can be added to the Stacks tab via New Stack > Graphics > CRU Driver on r_cru.
Configuration | Options | Default | Description |
General > Name | Name must be a valid C symbol | g_cru0 | Module name. |
Input > Capture Specifications > Number of pixels to capture horizontally | Value must be an integer greater than 0 | 1280 | Specify the number of horizontal pixels to capture. |
Input > Capture Specifications > Number of lines to capture vertically | Value must be an integer greater than 0 | 720 | Specify the number of vertical pixels to capture. |
Input > Capture Specifications > Horizontal pixel to start capture from | Value must be an integer | 0 | Specify the horizontal pixel to start capturing image data from. Allows an image smaller than the native resolution of a camera to be captured. |
Input > Capture Specifications > Line to start capture from | Value must be an integer | 0 | Specify the vertical line to start capturing image data from. Allows an image smaller than the native resolution of a camera to be captured. |
Input > Timing Custom > Timing |
-
User custom
-
Over 360Mbps
-
360 Mbps
-
250 Mbps
-
125 Mbps
-
80 Mbps
| Over 360Mbps | If User Custom is selected, any value can be set as each parameter |
Input > Timing Custom > T_INIT | Value must be an integer | 0 | If User Custom is selected, any value can be set as this parameter |
Input > Timing Custom > TCLK_MISS | Value must be an integer | 0 | If User Custom is selected, any value can be set as this parameter |
Input > Timing Custom > TCLK_SETTLE | Value must be an integer | 0 | If User Custom is selected, any value can be set as this parameter |
Input > Timing Custom > THS_SETTLE | Value must be an integer | 0 | If User Custom is selected, any value can be set as this parameter |
Input > Timing Custom > TCLK_PREPARE | Value must be an integer | 0 | If User Custom is selected, any value can be set as this parameter |
Input > Timing Custom > THS_PREPARE | Value must be an integer | 0 | If User Custom is selected, any value can be set as this parameter |
Input > Color format |
-
YUV420(8bit)
-
YUV420(10bit)
-
YUV422(8bit)
-
YUV422(10bit)
-
RGB565
-
RGB888
-
RAW8
-
RAW10
-
RAW12
-
RAW14
| YUV422(8bit) | Select the input color format. |
Input > Number of datalanes |
-
use 1 datalane
-
use 2 datalanes
-
use 4 datalanes
| use 2 datalanes | Select a number of datalanes. |
Output > Buffer > Image buffer section | This property must be a valid section name | UNCACHED_BSS | Specify the RAM section for the image data buffer. Typically .bss (internal RAM) or .sdram. When Arm Compiler 6 is used to place this memory in on-chip SRAM, the section name must be .bss or start with .bss. to avoid consuming unnecessary ROM space. |
Output > Buffer > Number of image buffers | Value must be an integer between 0 and 8 | 1 | Specify the number of buffers to create.When user select 0,the buffer set in user application can be used. |
Output > Color format |
-
YUV420 (YUYV)
-
YUV420 (UYVY)
-
YUV422 (YUYV)
-
YUV422 (UYVY)
-
RGB888 24bit
-
RGB888 32bit(Upper 8bit is 0)
-
ARGB8888
-
BGRA8888
| YUV422 (YUYV) | Select the output color format. |
Interrupts > Image Conversion > Enable Interrupt > Frame Start interrupt |
| Disable | Enable or Disable Image Conversion interrupt |
Interrupts > Image Conversion > Enable Interrupt > Frame End Interrupt |
| Disable | Enable or Disable Image Conversion interrupt |
Interrupts > Image Conversion > Enable Interrupt > Scan Line interrupt |
| Disable | Enable or Disable Image Conversion interrupt |
Interrupts > Image Conversion > Enable Interrupt > Scan Line Number | Value must be an integer between 0 and 4095 | 0 | Line specification for generating a scan line interrupt. |
Interrupts > Image Conversion > Callback | Name must be a valid C symbol | NULL | Set the callback function name for Image Conversion interrupt |
Interrupts > Image Conversion > Interrupt Priority | Value must be between 0 and 31 | 24 | Select the Image Conversion interrupt priority. |
Demosaic > bit extension |
-
repeat from the highest 4bits/2bits
-
filled with 0
| repeat from the highest 4bits/2bits | Bit extension for demosaic(8bit/10bit -> 12bit). |
Demosaic > RAW type |
-
R (RGRG...)
-
Gr(GRGR...)
-
Gb(GBGB...)
-
B (BGBG...)
| R (RGRG...) | The 1st pixel type of 1st line when used RAW data as input format |
Linearmatrix > Enable |
| disable | Enable or disable linearmatrix after demosaic.This function can be enabled if input format is RAW data |
Linearmatrix > Offset R | Value must be an integer between -128 and 127 | 0 | Offset R for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Offset G | Value must be an integer between -128 and 127 | 0 | Offset G for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Offset B | Value must be an integer between -128 and 127 | 0 | Offset B for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Rr | Value msut be -4 or more and less than 4 | 1.0 | Coefficient Rr for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Rg | Value msut be -4 or more and less than 4 | 0 | Coefficient Rg for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Rb | Value msut be -4 or more and less than 4 | 0 | Coefficient Rb for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Gr | Value msut be -4 or more and less than 4 | 0 | Coefficient Gr for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Gg | Value msut be -4 or more and less than 4 | 1.0 | Coefficient Gg for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Gb | Value msut be -4 or more and less than 4 | 0 | Coefficient Gb for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Br | Value msut be -4 or more and less than 4 | 0 | Coefficient Br for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Bg | Value msut be -4 or more and less than 4 | 0 | Coefficient Bg for Linear matrix calculation. Reference manual for details. |
Linearmatrix > Coefficient Bb | Value msut be -4 or more and less than 4 | 1.0 | Coefficient Bb for Linear matrix calculation. Reference manual for details. |
Statistics > Enable |
| disable | Enable or disable statistics.This function can be enabled if input format is RAW data |
Statistics > Buffer num | Value must be an integer between 0 and 8 | 0 | Number of buffers for statistics.When user select 0,the buffer set in user application can be used. |
Statistics > Processing unit |
-
16 x 16
-
32 x 32
-
64 x 64
-
128 x 128
| 16 x 16 | processing unit for statistics. |
Statistics > Input data bit position | Value must be an integer between 0 and 8 | 0 | Input data bit position for statistics.If input format is RAW16, [15-n:8-n:]data will be used |
Statistics > Horizontal start position | Value must be an integer between 0 and 376 | 0 | Horizontal start position for statistics |
This is a basic example of minimal use of the CRU in an application. This example shows how this driver can be used for capturing data from an external I/O device such as an image sensor.