![]() |
RZA Flexible Software Package Documentation
Release v1.1.0
|
|
Functions | |
fsp_err_t | R_CRU_Open (cru_ctrl_t *const p_api_ctrl, cru_cfg_t const *const p_cfg) |
fsp_err_t | R_CRU_Close (cru_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_CRU_CaptureStart (cru_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_CRU_CaptureStop (cru_ctrl_t *const p_api_ctrl) |
fsp_err_t | R_CRU_StatusGet (cru_ctrl_t *const p_api_ctrl, camera_status_t *p_status) |
Driver for the CRU peripheral on RZ MPUs. This module implements the Camera Interface.
The CRU supports interfacing with external cameras by accepting data signals in order to capture incoming data
Feature | Options |
---|---|
Input color formats | RGB565, RGB888, YCbCr420(8bit), YCbCr420(10bit), YCbCr422(8bit), YCbCr422(10bit), RAW8, RAW10, RAW12, RAW12 |
Datalanes | one, two, four |
Maximum resolution | Up to 2800 x 4095 pixels |
Interrupts | Frame Start, Frame End, Scan Line |
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
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 > Color format |
| YUV422(8bit) | Select the input color format. |
Input > Number of 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 |
| 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. |
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.
Data Structures | |
struct | cru_extended_cfg_t |
struct | cru_instance_ctrl_t |
Enumerations | |
enum | cru_color_input_format_t |
enum | cru_color_output_format_t |
enum | cru_datalane_t |
enum | cru_interrupt_enable_t |
enum | cru_event_image_conv_int_t |
struct cru_extended_cfg_t |
CRU hardware specific configuration
Data Fields | ||
---|---|---|
cru_datalane_t | num_datalane | select number of datalane |
cru_color_input_format_t | color_input | input color format |
cru_color_output_format_t | color_output | output color format |
cru_interrupt_enable_t | interrupt_enable | Interrupt enable table. |
uint16_t | scan_line_num | Line specification for generating a scan line interrupt. |
uint8_t | image_conv_int_ipl | Image conversion interrupt priority. |
IRQn_Type | image_conv_int_irq | Image conversion IRQ number. |
struct cru_instance_ctrl_t |
CRU instance control block.
Data Fields | |
cru_cfg_t const * | p_cfg |
Status of LCDC module. More... | |
uint8_t | capture_num |
The buffer number currently used by CRU. | |
void const * | p_context |
Placeholder for user data. Passed to the user callback. | |
void(* | p_callback )(camera_callback_args_t *p_args) |
Callback provided when a image conversion ISR occurs. | |
cru_cfg_t const* cru_instance_ctrl_t::p_cfg |
Status of LCDC module.
Pointer to the configuration structure
CRU color format setting
Color order setting
enum cru_datalane_t |
CRU interrupt enable
fsp_err_t R_CRU_Open | ( | cru_ctrl_t *const | p_api_ctrl, |
cru_cfg_t const *const | p_cfg | ||
) |
 Initializes the CRU modules and enables interrupts
FSP_SUCCESS | Initializes the CRU modules. |
FSP_ERR_ASSERTION | Pointer to the control block is NULL. |
FSP_ERR_ALREADY_OPEN | CRU module is already open |
FSP_ERR_INVALID_ARGUMENT | Invalid argument error |
FSP_ERR_INVALID_ALIGNMENT | Input buffer alignment |
fsp_err_t R_CRU_Close | ( | cru_ctrl_t *const | p_api_ctrl | ) |
Close the capture while the CRU module is operating
FSP_SUCCESS | Close the CRU module |
FSP_ERR_ASSERTION | Pointer to the control block is NULL. |
FSP_ERR_NOT_OPEN | CRU module is not open |
fsp_err_t R_CRU_CaptureStart | ( | cru_ctrl_t *const | p_api_ctrl | ) |
Start a capture. It is only possible when CRU is open.
FSP_SUCCESS | start a capture. |
FSP_ERR_ASSERTION | Pointer to the control block is NULL. |
FSP_ERR_INVALID_MODE | CRU module is not CAMERA_STATE_IN_PROGRESS |
fsp_err_t R_CRU_CaptureStop | ( | cru_ctrl_t *const | p_api_ctrl | ) |
Stop a capture. It is only possible when CRU is running.
FSP_SUCCESS | stop a capture. |
FSP_ERR_ASSERTION | Pointer to the control block is NULL. |
FSP_ERR_INVALID_MODE | CRU module is not CAMERA_STATE_BUSY |
fsp_err_t R_CRU_StatusGet | ( | cru_ctrl_t *const | p_api_ctrl, |
camera_status_t * | p_status | ||
) |
Get the camera status, CAMERA module status and buffer address. It is only possible when CRU is running.
FSP_SUCCESS | stop a capture. |
FSP_ERR_ASSERTION | Pointer to the control block is NULL. |
FSP_ERR_INVALID_MODE | CRU module is not CAMERA_STATE_BUSY |