Home
RZ/A1H Group Display Out Comparison Unit(DISCOM)
Contents
1. DISCOM_ON DISCOM_PIX_FORMAT_ARGB8888 On Pixel format ARGB8888 DISCOM_PIX_FORMAT_RGB888 Pixel format RGB888 DISCOM_PIX_FORMAT_RGB565 Pixel format RGB565 DISCOM_CMPSELP_NO DISCOM_CMPSELP_1_GRO Not selected Graphics 0 DISCOM_CMPSELP_2_GR1 Graphics 1 DISCOM_CMPSELP_3_GR2 Graphics 2 DISCOM_CMPSELP_4_GR3 DISCOM_CMPSELP_5_OIR DISCOM_CMPSELP_AB Table 6 7 OR W M O Ms H oO H o O Error Codes for the Sample Code Graphics 3 Graphics OIR Graphics data after a blending Constant Setting Description DISCOM_OK 0 Normal completion DISCOM_ERR_PARAM_CHANNEL Parameter error The specified channel number is not correct DISCOM_ERR_PARAM_BIT_WIDTH Parameter error The specified value is greater than the bit width of the parameter DISCOM_ERR_PARAM_UNDEFINED DISCOM_ERR_PARAM_NULL DISCOM_ERR_UPDATE_TIMING 3 4 5 Parameter error The specified value is not defined Parameter error Null cannot be set to the pointer Timing error The updating registers in this timing causes an unexpected result in the CRC code calculation DISCOM_ERR_STATUS R01AN1825EJ0100 Rev 1 00 May 27 2014 Status error Calling the API function is not allowed in the status Page 14 of 28 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 6 List of Variables Table 6 8 lists the static variables Table 6 8 Static
2. RO1AN1825EJ0100 Rev 1 00 Page 26 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 7 Sample Code The sample code is available on the Renesas Electronics Website 8 Documents for Reference User s Manual Hardware RZ A1H Group User s Manual Hardware The latest version can be downloaded from the Renesas Electronics website R7S72100 RTK772100BC00000BR GENMAI User s Manual The latest version can be downloaded from the Renesas Electronics website R7S72100 CPU GENMAJ Optional Board RTK7721000BOOO00BR User s Manual The latest version can be downloaded from the Renesas Electronics website ARM Architecture Reference Manual ARMv7 A and ARMv7 R edition Issue C The latest version can be downloaded from the ARM website ARM Generic Interrupt Controller Architecture Specification Architecture version 1 0 The latest version can be downloaded from the ARM website Technical Update Technical News The latest information can be downloaded from the Renesas Electronics website User s Manual Development Tools ARM Software Development Tools ARM Compiler toolchain ARM DS 5 etc can be downloaded from the ARM website The latest version can be downloaded from the Renesas Electronics website RO1AN1825EJ0100 Rev 1 00 Page 27 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program Website and Support Renesas Electronics website http www renesas com
3. VDC5 ch1 layer 2 Displays an image on the LCD RO1AN1825EJ0100 Rev 1 00 Page 3 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 2 Operation Check Conditions The sample code accompanying this application note has been run and confirmed under the conditions below Table 2 1 Operation Check Conditions Item Contents MCU used RZ A1H Operating frequency CPU clock I 400MHz Image processing clock Go 266 6 7MHz Internal bus clock Bo 133 33MHz Peripheral clock 1 P10 66 67MHz Peripheral clock 0 P06 33 33MHz Operating voltage Power supply voltage I O 3 3V Power supply voltage Internal 1 18V Integrated development ARM integrated development environment environment ARM Development Studio 5 DS 5 Version 5 16 C compiler ARM C C Compiler Linker Assembler Ver 5 03 Build 102 Compiler options excluding additional directory path O3 Ospace cpu Cortex A9 littleend arm apcs interwork no_unaligned_access fpu vfpv3_fp16 g asm Operating mode Boot mode 0 CS0 space 16 bit booting Board used GENMAI board RTK772100BC00000BR R7S72100 CPU board RTK7721000BO0000BR Option board for the R7S72100 CPU board Device used functionality to be Display Out Analog RGB D sub15 Option board J15 used on the board Serial interface connected with a Dsub 9 connector Note The operating frequency used in clo
4. Variables Variable Name Function Used int32_t DISCOM interrupt detection flag CrcErrorDetection 6 7 List of Functions Table 6 9 lists the list of functions Table 6 9 List of Functions Function name Page number R_DISCOM_Initialize 16 R_DISCOM_Terminate 16 R_DISCOM_Configure 17 R_DISCOM_SetInterrupt 19 R_DISCOM_ Start 19 R_DISCOM_Stop 19 R_DISCOM_GetCRC 20 DiscomDrv_Init 20 DiscomDrv_Term 20 DiscomDrv_ConvChannel 21 DiscomDrv_ConvGrTypeSelPlanel 22 DiscomDrv_ConvPixRdFormat 23 DiscomDrv_CalcCRC 24 RO1AN1825EJ0100 Rev 1 00 Page 15 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 Function Specifications This section contains the specifications for the functions that are implemented in the sample code 6 8 1 R_DISCOM Initialize R_DISCOM Initialize Synopsis DISCOM driver initialization Header r_discom h Declaration discom_error_t R_DISCOM_Initialize const discom_channel_t ch void const init_func uint32_t const uint82_t user_num Description In this function the operations are performed as below The specified user defined function is executed The DISCOM driver internal variables are initialized The operation of the panel clock is enabled Arguments ch Channel init_func Pointer to the user defined function user_num User defined number Return value Error code 6 8 2 R_DISCOM_Terminate R_DISCOM_Terminat
5. life support devices or systems surgical implantations etc or may cause serious property damages nuclear reactor control systems military equipment etc You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application for which itis not intended Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas Electronics You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility o
6. rectangular area for which the CRC code should be calculated Set a value smaller than or equal to the vertical size of graphics data uint16_t in Horizontal size for display out comparison cmpszx Specifies the horizontal size of the rectangular area for which the CRC code should be calculated Set a value so the horizontal size of graphics data can be as follows Horizontal size of graphics data gt Horizontal start position cmpspx Horizontal size cmpszx uint16_t in Vertical size for display out comparison cmpszy Specifies the vertical size of the rectangular area for which the CRC code should be calculated Set a value so the vertical size of graphics data can be as follows Vertical size of graphics data gt Vertical start position cmpspy Vertical size cmpszy RO1AN1825EJ0100 Rev 1 00 Page 18 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 4 R_DISCOM_SetInterrupt R_DISCOM_Setinterrupt Synopsis DISCOM driver set ISR Header r_discom h Declaration discom_error_t R_DISCOM_SetInterrupt const discom_channel_t ch void const callback void Description In this function the operations are performed as below Setting the interrupt of DISCOM Setting the callback function Arguments ch Channel callback Pointer to the user defined function Return value Error code 6 8 5 DH DISCOM Start R_DISCOM_ Start Synopsis DISCOM driver start Header r_discom h De
7. 050 2549 U S A Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Electronics Canada Limited 1101 Nicholson Road Newmarket Ontario LY 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Electronics Europe Limited Du Tel kes Meadow Millboard Road Bourne End Buckinghams ire SL8 5FH U K 44 1628 585 100 Fax 44 1628 585 900 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel Renesas Electronics D hina Co Ltd Room 1709 Quantum PI Tel 49 211 6503 0 Fax 49 211 6503 1327 aza No 27 ZhiChunLu Haidian District Beijing 100191 P R China 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Uni Tel it 301 Tower A Central Towers 555 Langao Road Putuo District Shanghai P R China 200333 86 21 2226 888 Fax 86 21 2226 0999 Renesas Electronics Hong Kong Limited Uni Tel it 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong 852 2265 6688 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 13F No 363 Fu Shing North Road Taipei 10543 Taiwan Tel Re 80 Tel Re Uni Tel Re 886 2 8175 9600 Fax 886 2 8175 9670 nesas Electronics pinga pore Pte Ltd Bendemeer Road Unit 06 02 Hyflux Innovation Centre Singapore 339949 65 6213 0200 Fax 65 6213 0300 nesas Electronics Malaysia Sdn Bhd it 906 Block B Menara Amcor
8. 2rCENESAS APPLICATION NOTE RZ A1H Group RO1AN1825EJ0100 Rev 1 00 Display Out Comparison Unit DISCOM Sample Program May 27 2014 Introduction This application note describes the sample program which checks through the RZ A1H s Display Out Comparison Unit DISCOM whether graphics data from a graphics display module the Video Display Controller 5 VDC5 is the same as expected The display out comparison unit sample program offers the following features e Selects layer 2 as the graphics plane for the graphics display module for comparing CRC codes e Uses software to calculate CRC codes which should be set in the DISCOM for comparison the DISCOM is also available to calculate CRC codes e Uses the 16 bit per pixel format RGB565 e Specifies the entire screen area as the rectangular areas to be compared e Generates an interrupt if the comparison detects a discrepancy e Compares the CRC codes through the DISCOM and serially outputs the comparison results while refreshing the screen at fixed intervals for example while changing colors from red to blue to white Target Device RZ A1H When applying the sample program covered in this application note to another microcomputer modify the program according to the specifications for the target microcomputer and conduct an extensive evaluation of the modified program RO1AN1825EJ0100 Rev 1 00 Page 1 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample P
9. DE_IO_REGRW CODE_RESET CODE_RESET CODE_FPU_INIT CODE_FPU_INIT H 1000 0000 InRoot InRoot H 0C00 0000 CODE_BASIC_SETUP CODE_BASIC_SETUP H 0800 0000 RESER_HANDLER Transfer exception RESER_HANDLER H 0000 0200 processing vector to i on chip RAM H 0400 0000 J H 0000 0100 VECTOR_MIRROR_TABLE p H 0000 0000 VECTOR_TABLE VECTOR_TABLE H 0000 0000 Figure 6 3 Section Assignment RO1AN1825EJ0100 Rev 1 00 Page 11 of 28 May 27 2014 RENESAS RZ A1H Group 6 2 2 Display Out Comparison Unit DISCOM Sample Program MMU settings The MMU is set to manage the 4 GB area in 1MB unit from the address H 0000 0000 in response to the memory map of the hardware resource used for the GENMAI board Set by the ttb_init s file The minimum unit should be 1MB when customizing the MMU based on the system Table 6 3 lists the Setting for MMU Table 6 3 Definition Name M_SIZE_ NOR M_SIZE_SDRAM M_SIZE_CS45 Setting for MMU Contents CS0 and CS1 spaces NOR flash memory CS2 and CS3 spaces SDRAM CS4 and CS5 spaces Address H 0000 0000 to H O7FF FFFF H 0800 0000 to H OFFF FFFF H 1000 0000 to H 17FF FFFF Memory Type L1 cache enable Normal memory L1 cache enable Normal memory Strongly ordered memory L1 cache disable M_SIZE_SPI SPI multi IO bus space 1 and 2 serial flash memory H 1800 0000 to H 1 FFF FFFF L1 cache enable Normal memory M_SIZE_RAM Large capacity on chip RAM
10. ENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 13 DiscomDrv_CalcCRC DiscomDrv_CalcCRC Synopsis Crc calculate Header discom_drv_utility h Declaration uint32_t DISCOMDRV _CalcCRC void const framebuff const uint32_t fb_ stride const discom_pix_format_t pix_format const uint32_t crc_ini const discom_rect_area_t const rect_area Description In this function the operations are performed as below CRC calculation of the rect area Arguments framebuff buffer pointer TD stride buffer stride pix_format pixel format erc_ini The initial value of the CRC rect_area The rect area for CRC calculation Return value Crc code RO1AN1825EJ0100 Rev 1 00 Page 24 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 9 Flowcharts 6 9 1 Main process shows main process described in this application note Gp init 1 GrpDrv_GraphicsCreateSurface 1 JL une CalbackisR 1 Grpbrv_StartSurfaces 1 DiscomPreparation R_DISCOM_Initialize R_DISCOM_Setlnterrupt R_DISCOM_Configure Gree rrorDetection SetGraphicData R vDos5 ChangeReadProcess Figure 6 4 Main Process 1 to 4 Initialize the VDC5 and configure the display settings o1 Initialize the DISCOM and configure the operation parameters Calculate the CRC codes for graphics data start the DISCOM O and check the CRC comparison results S Create gr
11. In this sample code the code and data used in the ROM area is located in the NOR flash memory connected to the CSO space and the code and data used in the RAM area is located in the large capacity on chip RAM Figure 6 2 RO1AN1825EJ0100 Rev 1 00 May 27 2014 Mirror space Normal space Memory Mapping H FFFF FFFF H 60A0 0000 H 6000 0000 H 5C00 0000 H 5800 0000 H 5000 0000 H 4C00 0000 H 4800 0000 H 4400 0000 H 4000 0000 H 20A0 0000 H 2000 0000 H 1C00 0000 H 1800 0000 H 1000 0000 H 0C00 0000 H 0800 0000 H 0400 0000 H 0000 0000 RZ A1H group Address space Others 2550MB GENMAI board Memory map Others 2550MB Large capacity on chip RAM 10MB Large capacity on chip RAM mirror space SPI multi UO bus space 2 64MB SPI multi UO bus mirror space 2 SPI multi I O bus space 1 64MB SPI multi UO bus mirror space 1 CS5 space 64MB CS4 space 64MB CS5 mirror space CS4 mirror space CS3 space 64MB CS3 mirror space CS2 space 64MB CS2 mirror space CS1 space 64MB CS1 mirror space CSO space 64MB CSO mirror space Others 502MB Others 502MB Large capacity on chip RAM 10MB Large capacity on chip RAM 10MB SPI multi UO bus space 2 64MB Serial flash memory 64MB SPI multi I O bus space 1 64MB Serial flash memory 64MB CS5 space 64MB CS4 space 64MB Us
12. Inquiries http www renesas com contact RO1AN1825EJ0100 Rev 1 00 Page 28 of 28 May 27 2014 RENESAS REVISISON HISTORY RZ A1H Group Display Out Comparison Unit DISCOM Sample Program Description Summary May 27 2014 First edition issued All trademarks and registered trademarks are the property of their respective owners General Precautions in the Handling of MPU MCU Products The following usage notes are applicable to all MPU MCU products from Renesas For detailed usage notes on the products covered by this document refer to the relevant sections of the document as well as any technical updates that have been issued for the products 1 Handling of Unused Pins Handle unused pins in accordance with the directions given under Handling of Unused Pins in the manual The input pins of CMOS products are generally in the high impedance state In operation with an unused pin in the open circuit state extra electromagnetic noise is induced in the vicinity of LSI an associated shoot through current flows internally and malfunctions occur due to the false recognition of the pin state as an input signal become possible Unused pins should be handled as described under Handling of Unused Pins in the manual 2 Processing at Power on The state of the product is undefined at the moment when power is supplied The states of internal circuits in the LSI are indeterminate and the states of register set
13. Pixel format pix_format e DISCOM_PIX_FORMAT_ARGB8888 ARGB8888 e DISCOM_PIX_FORMAT_RGB888 RGB888 e DISCOM_PIX_FORMAT_RGB565 RGB565 uint8_t in Default o value for display out comparison cmpdfa discom_onoff_t in Specifies whether to use the default a value for display out cmpdauf comparison e DISCOM_OFF Does not use the default a value e DISCOM_ON Uses the default a value discom_cmpselp_tdly in Plane selected for display out comparison cmpselp e DISCOM_CMPSELP_NO DISCOM_CMPSELP_1_GR0O Graphics DISCOM_CMPSELP_2_GR1 Graphics DISCOM_CMPSELP_3_GR2 Graphics 2 DISCOM_CMPSELP_4 _GR3 Graphics 3 DISCOM_CMPSELP_5_OIR Graphics OIR e DISCOM_CMPSELP_AB Graphics data after a blending 0 1 RO1AN1825EJ0100 Rev 1 00 Page 17 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program The discom_rect_area_t structure members are shown below typedef struct uintl6_t CMPSPX uintl6_t cmpspy uintl6_t CMpSZX uintl6_t cmpszy discom_rect_area_t Type Input output Description Argument name uint16_t in Horizontal start position for display out comparison cmpspx Specifies the horizontal start position of the rectangular area for which the CRC code should be calculated Set a value smaller than or equal to the horizontal size of graphics data uint16_t in Vertical start position for display out comparison cmpspy Specifies the vertical start position of the
14. SCOM channel 1 DISCOM_CHANNEL_NUM lt The number of DISCOM channels discom_channel_t RO1AN1825EJ0100 Rev 1 00 Page 21 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 11 DiscomDrv_ConvGrTypeSelPlanel DiscomDrv_ConvGrTypeSelPlanel Synopsis Conversion plane Header discom_drv_utility h Declaration discom_cmpselp_t DISCOMDRV_ConvGrTypeSelPlane const vdc5_graphics_type_t graphics_type Description In this function the operations are performed as below Conversion from graphics type into DISCOM selection plane Arguments graphics_type VDC5 Graphics type ID Return value Error code The r_vdc5 h vdc5S_graphics_type_t enumeration method is shown below typedef enum VDC5_GR_TYPE_GRO 0 VDC5_GR_TYPE_GR1 VDC5_GR_TYPE_GR2 VDC5_GR_TYPE_GR3 VDC5_GR_TYPE_VIN VDC5_GR_TYPE_OIR VDC5_GR_TYPE_NUM vdc5_graphics_type_t Jl lt EI lt Jl lt Graphics Graphics Graphics Graphics VIN OIR wneo Ai ay Wi The r_discom h discom_cmpselp_t enumeration method is shown below typedef enum DISCOM_CMPSELP_NO DISCOM_CMPSELP_1_GRO DISCOM_CMPSELP_2_GR1 DISCOM_CMPSELP_3_GR2 DISCOM_CMPSELP_4 GR3 DISCOM_CMPSELP_5_OIR DISCOM_CMPSELP_AB discom_cmpselp_t oot WN EF CH H lt No data lt Graphics da
15. Table 6 2 Sections to be Used 2 2 Area Name Description Type Loading Execution Area Area VECTOR_MIRROR_ Exception processing vector table TABLE Section to transfer data to large capacity on chip RAM CODE_HANDLER __ Program code area for user defined JMPTBL functions of IRQ interrupt handler CODE_HANDLER Program code area of IRQ interrupt handler This area consists of the following sections e CODE_HANDLER e IRQ_FIQ_HANDLER DATA HANDLER Registration table data area for RW Data JMPTBL user defined functions of IRQ interrupt handler ARM_LIB_STACK Application stack area Z Data IRQ_STACK IRQ mode stack area Z Data FIQ STACK FIQ mode stack area Z Data LRAM SVC_STACK Supervisor SVC mode stack area Z Data LRAM ABT_STACK Abort ABT mode stack area Z Data LRAM TTB MMU translation table area Z Data LRAM ARM_LIB_HEAP Application heap area Z Data LRAM Data area with initial value for defaults RW Data All the RW Data type sections which do not define section names with C source are assigned in this area Data area without initial value for Z Data defaults All the ZI Data type sections which do not define section names with C source area assigned in this area Display Buffer Notes 1 FLASH and LRAM shown in Loading Area and Execution Area indicate the NOR flash memory area and the large capacity on chip RAM area respectively 2 Basically the section name is set to be the same as the region s however it consists of some sec
16. aa E e raean ea aid E aai iaie cnet 20 68 9 Discombrv TEN a a ee Rete eck 20 6 8 10 Discompv ConvcChannel 21 6 8 11 Discomf nv Convt rfvpeGelblanel seie treestinttinstinttnnsttnttnnntnnstnnnnnnnn nne 22 6 8 12 DiScomDnv Conmvbtsvbdtomat 23 GB DiscomDbrv Cal eege eegene N E 24 6 9 FIOWGMANIS saci baci eesdeadecsedenechwecnasucebaendds aaiae ia ai aa aada aiaa eaaa iaa eraai 25 691 Man DIOEReg necnon R ecto 25 6 9 2 Process of detecting a CRC error through the DISCOM ssssssssessesrresrrssrrssrrssrrssrrssrrssrnsree 26 Te Sample COGS as Aegegtuugee ege dengdv ueeeegiebegd d egeggeeleneed eegend uge ida aiaa aani iaaa aaiae aani 27 8 Documents for Reference cceceeccceeeeeceeeeeeeeeeeeseeeeeeeaaeeeeeesaeeeseesaeseseesaeseseeseeeseeseeaesesneeseseseeeeeeseaes 27 RO1AN1825EJ0100 Rev 1 00 Page 2 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 1 Specifications This sample code in this application note checks through the RZ A1H s Display Out Comparison Unit DISCOM whether graphics data from a graphics display module the Video Display Controller 5 VDC5 is the same as expected Table 1 1 shows Peripheral Functions and Their Applications Table 1 1 Peripheral Functions and Their Applications Peripheral functions Application DISCOM Compares CRC codes for graphics data INTC interrupt ID CMP1 129 Controls an interrupt due to discrepancy detection by display out comparison
17. aphics data 8 Change the graphics data R01AN1825EJ0100 Rev 1 00 Page 25 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 9 2 Process of detecting a CRC error through the DISCOM ErrorDetection disconbrv_carccre C sar WaitVsync 2 WaitVsync VSYNC_WAIT_COUNT C aprscorseos idt d WaitVsync 1 Figure 6 5 CRC Error Detection through the DISCOM ch lt Calculate the CRC codes for graphics data in software Start the DISCOM 3 Wait two Vsync periods P The DISCOM register settings are updated at the end of the effective period of graphics data Thus wait one Vsync period until they are updated Display out comparison starts upon detection of the start of effective graphics data Thus wait another Vsync period The total wait time is two Vsync periods 4 Clear the DISCOM interrupt detection flag If the graphics data does not match an interrupt occurs due to discrepancy detection by display out comparison setting this flag to 1 o1 aS Perform the display out comparison process during the VSYN_WAIT_COUNT period Stop the DISCOM Wait one Vsync period ana N O YS aS Wait one Vsync period until the DISCOM register settings are updated 8 Output the display out comparison results Check the status of the DISCOM interrupt detection flag and then serially output the comparison results
18. ck mode 0 Clock input of 13 33MHz from EXTAL pin RO1AN1825EJ0100 Rev 1 00 Page 4 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 3 Related Application Notes For additional information associated with this document refer to the following application note RZ A1H Group Example of Initialization RO1AN1864EJ RZ A1H Group Video Display Controller 5 Sample Driver RO1AN1822EJ RZ A1H Group I O definition header file lt iodefine h gt ROLAN1860EJ 4 Peripheral Functions The basic functions of the CEU and VDC5 are described in the RZ A1H Group User s Manual Hardware RO1AN1825EJ0100 Rev 1 00 Page 5 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 5 Hardware 5 1 Hardware Configuration Figure 5 1 shows Examples of Hardware Devices Connected Graphics display module VDC5 Graphics Graphics data display plane 1 Display timing Superimposition p p control Graphics plane 5 This module Display out compare CRC32 calculation Interrupt signal Comparator Select Expected CRC register code register Figure 5 1 Examples of Hardware Devices Connected RO1AN1825EJ0100 Rev 1 00 Page 6 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 Software 6 1 Operational Overview This sa
19. claration discom_error_t R_DISCOM_Start const discom_channel_t ch const uint32_t cmpecrc Description In this function the operations are performed as below Start DISCOM Setting the CRC code to compare Arguments ch Channel cmpecrc Expected display out comparison CRC code Return value Error code 6 8 6 R_DISCOM_Stop R_DISCOM_Stop Synopsis DISCOM driver stop Header r_discom h Declaration discom_error_t R_DISCOM_Stop const discom_channel_t ch Description In this function the operations are performed as below Stop DISCOM Arguments ch Channel Return value Error code RO1AN1825EJ0100 _ Rev 1 00 Page 19 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 7 R_DISCOM_GetCRC R_DISCOM_GetCRC Synopsis T DISCOM driver get CRC code Header r_discom h Declaration discom_error_t R_DISCOM_GetCRC const discom_channel_t ch const uint32_t crc_code Description In this function the operations are performed as below Get CRC code Arguments ch Channel crc_code CRC code Return value Error code 6 8 8 DiscomDrv_Init DiscomDrv_Init Synopsis DISCOM driver initialization Header discom_drv_utility h Declaration discom_error_t DISCOMDRV _Init const discom_channel_t channel void const IntCallbackFunc void Description In this function the operations are performed as below Call the function R_DISCOM_Initialize Call the function R_DISCOM_SetI
20. e Synopsis DISCOM driver termination Header r_discom h Declaration discom_error_t R_DISCOM_Terminate const discom_channel_t ch void const quit_func uint32_t const uint32_t user_num Description In this function the operations are performed as below The specified user defined function is executed Stop the interrupt of DISCOM Arguments ch Channel quit_func Pointer to the user defined function user_num User defined number Return value Error code RO1AN1825EJ0100 Rev 1 00 Page 16 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 3 R_DISCOM_Configure R_DISCOM_Configure Synopsis DISCOM driver configuration Header r_discom h Declaration discom_error_t R_DISCOM_Configure const discom_channel_t ch const discom_config_t const config const discom_rect_area_t const rect_area Description In this function the operations are performed as below Operation Parameter Setting Setting the rectangular area for which the CRC code is calculated Arguments ch Channel config Operation Parameter Setting rect_area Rectangular area for which the CRC code is calculated Return value Error code The discom_config_t structure members are shown below typedef struct discom_pix_format_t pix_format uint8_t cmpdfa discom_onoff_t cmpdauf discom_cmpselp_t cmpselp discom_config_t Type Input ou Description Argument name tput discom_pix_format_t in
21. er area CS3 space 64MB SDRAM 64MB CS2 space 64MB SDRAM 64MB CS1 space 64MB NOR flash memory 64MB CSO space 64MB RENESAS NOR flash memory 64MB Page 8 of 28 RZ A1H Group 6 2 1 Display Out Comparison Unit DISCOM Sample Program Section Assignment in Sample Code In this sample code the exception processing vector table and the IRQ interrupt handler are assigned to the large capacity on chip RAM and they are executed in such RAM to speed up the interrupt processing The transfer processing from the NOR flash memory area which is the program code of the exception processing vector table and the IRQ interrupt handler to the large capacity on chip RAM area the clear to zero processing for the data selection without initial data and the initialization for the data selection with initial data are executed by using the scatter loading function Refer to Image structure and generation in ARM Compiler toolchain Using the Linker provided by the ARM for more information about the scatter loading function Table 6 1 and Table 6 2 list the Sections to be Used in this sample code Figure 6 3 shows the Section Assignment for the initial condition of the sample code and the condition after using the scatter loading function Table 6 1 Area Name VECTOR_TABLE RESET_HANDLER CODE_BASIC_SETUP Sections to be Used 1 2 Description Exception processing vector table Program code a
22. f physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or systems manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction When exporting the Renesas Elec
23. mple program checks through the DISCOM whether graphics data from graphics display module VDC5 is the same as expected The screen displayed by the VDC5 is refreshed at fixed intervals Each time it is refreshed its data is compared by using the DISCOM The CRC codes for comparison of data on the screen are calculated in software and set in the DISCOM The DISCOM is also available to calculate the CRC codes If the compared data does not match a discrepancy is detected upon a DISCOM interrupt due to discrepancy detection by display out comparison The comparison results are serially output 6 1 1 Serial output Below is output serial data CRC values are enclosed in parentheses The bit rate for serial data transmission is 115 200 bps RZ A1H CPU Board Sample Program Ver 1 00 Copyright C 2013 Renesas Electronics Corporation All rights reserved _ Aragon Discom Sample Ver 1 00 _ CRC OK 0x209C86E3 CRC OK 0x571E9393 CRC OK 0x0E34838C CRC OK 0xC4F7C315 CRC OK 0x5278291D CRC OK 0x98BB6984 CRC OK 0xC191799B CRC OK 0x2B4702B4 CRC OK 0xD3E181F3 CRC OK 0x9DDDD30A CRC OK 0xBDB85D8F CRC OK 0x0B523902 CRC OK 0xA7833023 Figure 6 1 Output from the DISCOM RO1AN1825EJ0100 Rev 1 00 Page 7 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 2 Memory Mapping Figure 6 2 shows the Address Space of the RZ A1H group and the Memory Mapping of the GENMAI board
24. nterrupt Arguments channel Channel IntCallbackFunc Pointer to the user defined function Return value Error code 6 8 9 DiscomDrv_Term DiscomDrv_Term Synopsis DISCOM driver termination Header discom_drv_utility h Declaration discom_error_t DISCOMDRV _Term const discom_channel_t channel Description In this function the operations are performed as below Call the function R_DISCOM_Terminate Call the function R_DISCOM_SetInterrupt Arguments channel Channel Return value Error code RO1AN1825EJ0100 Rev 1 00 Page 20 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 10 DiscomDrv_ConvChannel DiscomDrv_ConvChannel Synopsis Conversion channel Header discom_drv_utility h Declaration discom_channel_t DiscomDrv_ConvChannel vdc5_channel_t channel Description In this function the operations are performed as below Conversion from VDC5 channel into DISCOM channel Arguments channel Channel Return value Error code The r_vdc5 h vdc5_channel_t enumeration method is shown below Channel typedef enum VDC5_CHANNEL_0O D lt VDC5 channel 0 VDC5_CHANNEL_1 lt VDC5 channel 1 VDC5_CHANNEL_ NUM lt The number of VDC5 channels vde5_channel_t r_discom h discom_channel_t enumeration method is shown below typedef enum DISCOM_CHANNEL_0 0 lt DISCOM channel 0 DISCOM_CHANNEL_1 lt DI
25. or the sample code Table 6 5 Basic Data Types for the Sample Code char_t 8 bit character bool_t Boolean type value true 1 or false 0 int_t High speed integer signed 32 bit integer in this sample code int8_t 8 bit integer singed Defined by standard library inti6_t 16 bit integer singed Defined by standard library int32_t 32 bit integer singed Defined by standard library int64_t 64 bit integer singed Defined by standard library uint8_t 8 bit integer unsigned Defined by standard library uint16_t 16 bit integer unsigned Defined by standard library uint32_t 32 bit integer unsigned Defined by standard library uint64_t 64 bit integer unsigned Defined by standard library float32_t 32 bit floating point Defined by standard library when specifying __ARM_NEON__ float64_t 64 biy floating point Defined by standard library Defined by standard library when specifying __ARM_NEON__ floati28_ t 128 bit floating point RO1AN1825EJ0100 Rev 1 00 Page 13 of 28 May 27 2014 RENESAS RZ A1H Group 6 5 List of Constants and Error Codes Display Out Comparison Unit DISCOM Sample Program Table 6 6 lists the constants for the sample program Table 6 7 lists the error codes for the sample code Table 6 6 Constant DISCOM CHANNEL 0 Constants for the Sample Program Setting CH Description DISCOM channel 0 DISCOM_CHANNEL_1 DISCOM channel 1 DISCOM_OFF
26. p Amcorp Trade Centre No 18 Jin Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia 60 3 7955 9390 Fax 60 3 7955 9510 nesas Electronics Korea Co Ltd 12F 234 Teheran ro Gangnam Ku Seoul 135 920 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2014 Renesas Electronics Corporation All rights reserved Colophon 4 0
27. rea of reset handler processing This area consists of the following sections e INITCA9CACHE L1 cache setting e INIT_TTB MMU setting e RESET HANDLER Reset handler Program code area to optimize operating frequency and flash memory Code Loading Area FLASH FLASH Execution Area FLASH FLASH InRoot This area consists of the sections located in the root area such as C standard library Code and RO Data FLASH FLASH CODE_FPU_INIT Program code area for NEON and VFP initializations This area consists of the following sections e CODE_FPU_INIT e FPU_INIT Code FLASH FLASH CODE_RESET Program code area for hardware initialization This area consists of the following sections e CODE_RESET Startup processing e INIT_VBAR Vector base setting Code FLASH FLASH CODE_IO_REGRW Program code area for read write functions of I O register Code FLASH FLASH CODE Program code area for defaults All the Code type sections which do not define section names with C source are assigned in this area Code FLASH FLASH CONST Constant data area for defaults All the RO Data type sections which do not define section names with C source are assigned in this area RO1AN1825EJ0100 Rev 1 00 May 27 2014 7tENESAS RO Data FLASH FLASH Page 9 of 28 RZ A1H Group Display Out Comparison Unit DISCOM Sample Program
28. rogram Contents Ta Specat EE 3 2 Operation Check Conditions 4 3 Related Application Notes AAA 5 4 Peripheral leet EE 5 Oe Ee UE 6 5 1 Hardware Configuration serge SEENEN NEEEERdENEE NEGER EENEG EENS 6 Gg OMY ANS au sae ven taco oanca tae dus nati st ao wesc cued T ae uiauee enw aadeecan tennis RA 7 6 1 Operational OVErView ccccceecceceeeeeeeeceeeeeeeneeeceaeeeeaae sence seaeeeeaaesaaeseaeeesaaeseeaaesseceeseaeeesaeseeaeeesaes 7 GA Serial Tu E 7 6 2 Memory Mapping itecis cciec ceteris ee edisieaediat net aE aed Mates ces ea lipase eden 8 6 2 1 Section Assignment in Sample Code ccccccceceeeeeeeeeceeeeeeaeeeeaeeceeeeesaeeeeaaeseeeeeseaeeeseaeeseaeeteaes 9 622 En E 12 6 3 lut 13 6 4 Basic Data ND edel Eege eebe shining iea iiaa i ade 13 6 5 List of Constants and Error Codes ssseesseeesessirssirssirssirssirssirssinsstisstnsstenstnsttnnstnnntnn ttnn nnen nenn tnt 14 6 6 Eist of Variable Sariai ia anaa aaaea adaa aa a daadaa iaia 15 6 7 EISTOF FUNCIONS iaiiaeeeai aA i A T A aaia i 15 6 8 FUNCTION e le TEE 16 684A R DISCOM Initializes 3222 00 EES 16 6 8 2 RH DISCOM Teminate sariini tennan naiai eaa aa E aaa a Raa a aE 16 E WE RI e e Beete 17 BS R_DISCOM S tInteruptiiinancicsateciessteicadsaedecasiaeaieaciadeecteasessadeaadecareavansdfastddveaesvateadaatlecareavateds 19 e EES 19 6 8 6 Re DISCOM SIOD ceria ERE EEEE E EE EE ES 19 6 8 7 ReDISCOM_GetCRG oiera a iaaa ariaa iia 20 6 8 8 DiscomDV Alseen reae e a
29. space H 2000 0000 to H 209F FFFF L1 cache enable Normal memory M_SIZE_IO_1 On chip peripheral module and reserved area H 20A0 0000 to H 3FFF FFFF Strongly ordered memory L1 cache disable M_SIZE_NOR_M CSO and CS1 mirror spaces H 4000 0000 to H 47FF FFFF L1 cache disable Normal memory M_SIZE_SDRAM_M CS2 and CS3 mirror spaces H 4800 0000 to H 4FFF FFFF L1 cache disable Normal memory M_SIZE_CS45_M M_SIZE_SPI_M CS4 and CS5 mirror spaces SPI multi IO bus mirror space 1 and 2 H 5000 0000 to H 57FF FFFF H 5800 0000 to H 5FFF FFFF Strongly ordered memory L1 cache disable L1 cache disable Normal memory M_SIZE_RAM_M Large capacity on chip RAM mirror space H 6000 0000 to H 609F FFFF L1 cache disable Normal memory M_SIZE_IO _2 On chip peripheral module and reserved area R01AN1825EJ0100 Rev 1 00 May 27 2014 H 60A0 0000 to H FFFF FFFF RENESAS 2550MB Strongly ordered memory L1 cache disable Page 12 of 28 RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 3 Interrupts Table 6 4 shows interrupts for the sample code Table 6 4 Interrupts for the Sample Code Interrupt factor ID CMP1 5 Interrupt due to discrepancy detection by display out comparison GR3_VLINE1 Line signal specified for graphics 3 panel output 6 4 Basic Data Types Table 6 5 shows the basic data types f
30. ta lt Graphics data lt Graphics data lt Graphics data lt Graphics lt Graphics of plane of plane of plane of plane 1 2 3 4 data of plane 5 data after alpha blending VDC5 graphics 0 VDC5 graphics 1 VDC5 graphics 2 VDC5 graphics 3 VDC5 OIR RO1AN1825EJ0100 Rev 1 00 May 27 2014 RENESAS Page 22 of 28 RZ A1H Group Display Out Comparison Unit DISCOM Sample Program 6 8 12 DiscomDrv_ConvPixRdFormat DiscomDrv_ConvPixRdFormat Synopsis Header Declaration Description Arguments Return value Conversion signal format discom_drv_utility h vde5_gr_format_t DISCOMDRV _ConvPixRdFormat const discom_pix_format_t pix_format In this function the operations are performed as below Conversion from DISCOM pixel format into VDC5 read signal format pix_format Error code The r_discom h discom_pix_format_t enumeration method is shown below typedef enum DISCOM_PIX_FORMAT ARGB8888 0 DISCOM_PIX_FORMAT _RGB888 DISCOM_PIX_FORMAT RGB565 DISCOM_PIX_FORMAT_NUM discom_pix_format_t The r_vdc5 h vdc5_gr_format_t enumeration method is shown below typedef enum VDC5_GR_FORMAT_RGB565 0 lt RGB565 VDC5_GR_FORMAT_RGB888 lt RGB888 VDC5_GR_FORMAT_ARGB8888 lt ARGB8888 VDC5_GR_FORMAT_NUM lt The number of signal formats y vdc5_gr_format_t RO1AN1825EJ0100 Rev 1 00 Page 23 of 28 May 27 2014 R
31. tings and pins are undefined at the moment when power is supplied In a finished product where the reset signal is applied to the external reset pin the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed In a similar way the states of pins in a product that is reset by an on chip power on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified 3 Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited The reserved addresses are provided for the possible future expansion of functions Do not access these addresses the correct operation of LSI is not guaranteed if they are accessed 4 Clock Signals After applying a reset only release the reset line after the operating clock signal has become stable When switching the clock signal during program execution wait until the target clock signal has stabilized When the clock signal is generated with an external resonator or from an external oscillator during a reset ensure that the reset line is only released after full stabilization of the clock signal Moreover when switching to a clock signal produced with an external resonator or by an external oscillator while program execution is in progress wait until the target clock signal is stable 5 Differences between Products Before changing from one prod
32. tions in the areas of RESET HANDLER InRoot CODE_FPU_INIT CODE_RESET CODE CONST CODE_HANDLER DATA and BSS Refer to the ARM compiler toolchain manual about the region and the section RO1AN1825EJ0100 Rev 1 00 Page 10 of 28 May 27 2014 RENESAS RZ A1H Group Display Out Comparison Unit DISCOM Sample Program Section assignment RZ A1H group Section assignment Address space Load view Execution view Memory allocation after executing scatter loading H FFFF FFFF H 209F FFFF Clear to zero gt Initialize data with initial value H 200B 8000 ARM_LIB_HEAP H 2003 8000 Secure area such TTB H 2003 4000 as stack area H 2003 2000 p ABT_STACK H 2003 0000 SVC_STACK H 2002 E000 FIQ_STAC H 2002 C000 IRQ_STACK H 2002 4000 ARM_LIB_STACK Initialize data with initial value m DATA_HANDLER_JMPTBL CODE_HANDLER gt H 2002 0100 CODE_HANDLER_JMPTBL H 2002 0000 VECTOR_MIRROR_TABLE H 2000 0000 H 03FF FFFF H 4000 0000 DATA_HANDLER_JMPTBL H 20A0 0000 Large capacity on chip RAM GODE HANDEER H 2000 0000 Pehle l CODE_HANDLER_JMPTBL Transfer program CONST code which requires CONST speeding up to on H 1C00 0000 chip RAM CODE CODE H 1800 0000 CODE_IO_REGRW CO
33. tronics products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations 10 Itis the responsibility of the buyer or distributor of Renesas Electronics products who distributes disposes of or otherwise places the product with a third party to notify such third party in advance of the contents and conditions set forth in this document Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products 11 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics 12 Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics SALES OFFICES Renesas Electronics Corporation http www renesas com w N E SAS Refer to http www renesas com for the latest and detailed information Renesas Electronics America Inc 2801 Scott Boulevard Santa Clara CA 95
34. uct to another i e to a product with a different part number confirm that the change will not lead to problems The characteristics of an MPU or MCU in the same group but having a different part number may differ in terms of the internal memory capacity layout pattern and other factors which can affect the ranges of electrical characteristics such as characteristic values operating margins immunity to noise and amount of radiated noise When changing to a product with a different part number implement a system evaluation test for the given product Notice Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics does not assume any liability for infringement of patents cop
35. yrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration modification copy or otherwise misappropriation of Renesas Electronics product Renesas Electronics products are classified according to the following two quality grades Standard and High Quality The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots etc High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems and safety equipment etc Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury artificial
Download Pdf Manuals
Related Search
Related Contents
Manual do operador Lenovo ThinkVision E74 Catálogo de producto RIGOL FCC 47 CFR PART 15 SUBPART B TEST REPORT Acer ProDock Instruction Manual - Sony Asia Pacific DK-KP95PH Operation-Manual IT User Manual for STEP 7 Copyright © All rights reserved.
Failed to retrieve file