RZ/A Flexible Software Package Documentation  Release v3.3.0

 
Image Scaling Unit (r_isu)

Functions

fsp_err_t R_ISU_Open (isu_ctrl_t *const p_api_ctrl, isu_cfg_t const *const p_cfg)
 
fsp_err_t R_ISU_Close (isu_ctrl_t *const p_api_ctrl)
 
fsp_err_t R_ISU_Start (isu_ctrl_t *const p_api_ctrl)
 
fsp_err_t R_ISU_ChangeCfg (isu_ctrl_t *const p_api_ctrl, isu_runtime_cfg_t *const p_runtime_cfg)
 

Detailed Description

Driver for the ISU peripheral on RZ MPUs. This module implements the Image Scaling Interface.

Overview

The ISU supports resize image function that can convert color space from RGB to YUV or from YUV to RGB.

Features

Feature Options
Color formats RGB565, RGB888, BGR888, ARGB8888, RGBA8888, ABGR8888, YCbCr422(UYVY), YCbCr422(YUY2), RAW8, RAW10, RAW12
Maximum resolution Up to 2800 x 2047 pixels
Interrupts Frame End

Configuration

Build Time Configurations for r_isu

The following build time configurations are defined in fsp_cfg/r_isu_cfg.h:

ConfigurationOptionsDefaultDescription
Parameter Checking
  • Default (BSP)
  • Enabled
  • Disabled
Default (BSP) If selected code for parameter checking is included in the build.

Configurations for Graphics > ISU Driver on r_isu

This module can be added to the Stacks tab via New Stack > Graphics > ISU Driver on r_isu.

ConfigurationOptionsDefaultDescription
General > NameName must be a valid C symbolg_isu0 Module name.
Input > Framebuffer > Framebuffer nameThis property must be a valid C symbolisu_input_buffer If you select the FSP custom as "Framebuffer consiguration", specify the name for the framebuffer.
Input > Framebuffer > Image buffer sectionThis property must be a valid section nameUNCACHED_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.
Input > Horizontal sizeValue must be an integer between 1 and 28001280 Specify the horizontal size of input image.
Input > Vertical sizeValue must be an integer between 1 and 2047800 Specify the vertical size of input image.
Input > Horizontal strideValue must be 32byte boundary integer 2560 Specify the horizontal stride of input image.
Input > Color formatRefer to the RZA Configuration tool for available options.RGB565 Select color format of input image.
Input > 4byte swap
  • enable
  • disable
disable 4byte data swap for input image
Input > 2byte swap
  • enable
  • disable
disable 2byte data swap for input image
Input > 1byte swap
  • enable
  • disable
disable 1byte data swap for input image
Output > Framebuffer > Framebuffer nameThis property must be a valid C symbolisu_output_buffer If you select the FSP custom as "Framebuffer consiguration", specify the name for the framebuffer.
Output > Framebuffer > Image buffer sectionThis property must be a valid section nameUNCACHED_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 > Horizontal sizeValue must be an integer between 1 and 28001280 Specify the horizontal size of output image.
Output > Vertical sizeValue must be an integer between 1 and 2047800 Specify the vertical size of output image.
Output > Horizontal strideValue must be 32byte boundary integer2560 Specify the horizontal stride of output image.
Output > Color formatRefer to the RZA Configuration tool for available options.RGB565 Select color format of output image.
Output > 4byte swap
  • enable
  • disable
disable 4byte data swap for output image
Output > 2byte swap
  • enable
  • disable
disable 2byte data swap for output image
Output > 1byte swap
  • enable
  • disable
disable 1byte data swap for output image
Interrupt > Frame End Interrupt PriorityValue must be between 0 and 3124 Input the frame end interrupt priority
Interrupt > CallbackName msut be a valid C symbolNULL Set the callback function name for ISU frame end interrupt.

Usage Notes

Interrupt Configuration

Parameter settings

Limitations

Examples

Basic Example

This is a basic example of minimal use of the ISU in an application.

void basic_example (void)
{
/* Open the ISU driver */
g_isu_on_isu.open(&g_isu_ctrl, &g_isu_cfg);
/* Start scaling */
g_isu_on_isu.start(&g_isu_ctrl);
/* Change image scaling configuration */
g_isu0_runtime_cfg.output.hsize = ISU_OUTPUT_HSIZE_2ND;
g_isu0_runtime_cfg.output.vsize = ISU_OUTPUT_VSIZE_2ND;
g_isu0_runtime_cfg.output.hstride = ISU_OUTPUT_STRIDE_2ND;
/* Scaling with changed paramters */
g_isu_on_isu.changeCfg(&g_isu_ctrl, &(g_isu0_runtime_cfg));
}

Data Structures

struct  isu_extended_cfg_t
 

Data Structure Documentation

◆ isu_extended_cfg_t

struct isu_extended_cfg_t

Image scaling control block. DO NOT INITIALIZE. ISU hardware specific configuration

Data Fields
uint8_t isu_frame_end_ipl Image conversion interrupt priority.
IRQn_Type isu_frame_end_irq Image conversion IRQ number.

Function Documentation

◆ R_ISU_Open()

fsp_err_t R_ISU_Open ( isu_ctrl_t *const  p_api_ctrl,
isu_cfg_t const *const  p_cfg 
)

 Initializes the ISU modules and set interrupt configuration

Return values
FSP_SUCCESSInitializes the ISU modules.
FSP_ERR_ASSERTIONPointer to the control block is NULL.
FSP_ERR_ALREADY_OPENIRU module is already open
FSP_ERR_INVALID_ARGUMENTInvalid argument error
FSP_ERR_INVALID_ALIGNMENTInput buffer alignment

◆ R_ISU_Close()

fsp_err_t R_ISU_Close ( isu_ctrl_t *const  p_api_ctrl)

 Close the ISU modules

Return values
FSP_SUCCESSClose the ISU module
FSP_ERR_ASSERTIONPointer to the control block is NULL.
FSP_ERR_INVALID_MODEISU module is not ISU_IN_PROGRESS or ISU_STATE_BUSY

◆ R_ISU_Start()

fsp_err_t R_ISU_Start ( isu_ctrl_t *const  p_api_ctrl)

 Start scaling the input image

Return values
FSP_SUCCESSstart a capture.
FSP_ERR_ASSERTIONPointer to the control block is NULL.
FSP_ERR_INVALID_MODEISU module is not ready.

◆ R_ISU_ChangeCfg()

fsp_err_t R_ISU_ChangeCfg ( isu_ctrl_t *const  p_api_ctrl,
isu_runtime_cfg_t *const  p_runtime_cfg 
)

 Change scaling configuration

Return values
FSP_SUCCESSChange scaling configuration.
FSP_ERR_ASSERTIONPointer to the control block is NULL.
FSP_ERR_INVALID_MODEISU module is not ready.
FSP_ERR_INVALID_ARGUMENTInvalid argument error
FSP_ERR_INVALID_ALIGNMENTInvalid alignment error