C

RH850 D1M1A

This topic provides board-specific information about Renesas' RH850.

Supported color depths

The reference port for this board supports 32bpp color depth. The board also supports 16bpp and 24bpp with the ItemLayer API, but not with QUL_COLOR_DEPTH. See Color depth for more information.

Board configuration

Connect the Mango Adapter to the Main Board, and ensure that all jumpers and switches are set exactly as described.

Enable HDMI Output

To enable HDMI video output, follow the jumper and dip-switch configuration.

On the Mango Main Board:

  • Connect the JP96 pins
  • Open JP98 pins 2 and 3, and connect pin PJ99 to JP98-2.
  • DSW31.7 switch set to OFF

On the Mango Adapter Board:

  • DSW1.1 switch set to OFF

Enable LVDS Output

To enable LVDS video output, follow the dip-switch configuration on the Mango Adapter Board:

  • DSW1.6 switch set to OFF

Enable Flashing

To enable flashing and debugging, ensure that the following switch configuration is set:

SwitchState
SW3PU
SW5OFF
SW9OFF
SW2PU
SW7PD
SW1OFF
SW4OFF
SW6PD
SW8OFF
SW10PD

Enable HMI section

To be able to use the HMI section on the board (HMI knob and 4-direction switch), open JP30 and set the DWS29.1-1 switches to ON.

Note: This setup can interfere with CAN. See Mango Main Board reference docs for more details.

Set up your development environment

For instructions on how to set up your development environment to use the command line for RH850, refer to Setting up a development environment for RH850/D1M1A.

Supported displays

The reference port supports both HDMI and LVDS display output.

The pre-built library and binaries use the HDMI display with a standard VESA 800x600 @60Hz configuration.

LVDS display

To use an LVDS display, follow these steps:

  • Configure the Mango Adapter Board as described in Enable LVDS Output
  • Rebuild the Platform library with the -DQUL_RH850_USE_LVDS_DISPLAY CMake option. This sets the compile define USE_VDCE_OPENLDI needed when building the BSP sources from Renesas.

The reference port uses a 1280x800 @60Hz configuration for the LVDS display, with custom timing parameters matching the HannStar 1280x800 HSD070PWW1-B00 display. To use a different configuration suitable for your display, see the next section.

Note: The Qt Quick Ultralite layers Example will not work at 1280x800 because of layers width requirements. This can be fixed by following the requirements listed under Custom layer requirements.

Change display configuration

To change display configuration, independently of HDMI or LVDS, you can either use an already already available display mode provided in the Renesas Graphics Library (RGL) SDK, or define a custom one.

Display modes available from RGL

  • Choose one of the already available display modes listed in r_ddb_timing.c in the RGL SDK (e.g. VESA 1024x768 @60Hz)
  • Modify the following in the platform_config.h header:
    • Set QUL_RH850_DISPLAY_CONFIGURATION_NAME to the string identifier for the chosen configuration ("VESA_1024x768_60Hz")
    • Set the correct QUL_PLATFORM_DEFAULT_SCREEN_WIDTH and QUL_PLATFORM_DEFAULT_SCREEN_HEIGHT
  • Rebuild the Platform library

Custom display mode

Follow these steps instead to use a custom display configuration.

  • Define the display timing parameters in platform_display.cpp with your r_ddb_Timing_t struct. See r_ddb_api.h in the RGL SDK for more information.
  • Use the struct when invoking R_WM_ScreenTimingSet()
  • Set the correct QUL_PLATFORM_DEFAULT_SCREEN_WIDTH and QUL_PLATFORM_DEFAULT_SCREEN_HEIGHT in the platform_config.h header
  • Rebuild the Platform library

Dedicated framebuffer area in SDRAM

A framebuffer area of 8128k is reserved in SDRAM. It allows to fit a double framebuffer of maximum size 1280x800 at 32bpp. To change this to fit your screen size, color depth and framebuffers number, follow these steps:

  • Set the MAX_FRAMEBUFFER_SIZE in platform_memory.cpp to the desired size, adding some extra space for memory allocation alignment requirements
  • Offset the beginning of the SDRAM region in your linker script by the same amount
  • Rebuild the Platform library

Platform-specific CMake options

Following CMake options are available exclusively for this platform:

CMake OptionDescription
QUL_USE_DEFAULT_RH850_STARTUP_FILEBy default Qt Quick Ultralite is using startup file that comes with the RGL library. Set this global variable to OFF to disable this behavior. Then you are able to add your custom startup file to the executable target sources.

Resource cache policy

By default, an application's resource data is copied to SDRAM on startup. In order to retain these resources in flash and not load them to RAM on startup, add the following QmlProject option to your qmlproject file:

MCU.Config {
    resourceCachePolicy: "NoCaching"
}

Alternatively, it can be enabled only for individual images like this:

ImageFiles {
    files: [
        "big/button.png"
    ]
    MCU.resourceCachePolicy: "NoCaching"
}

Using Octa Flash or Octa RAM

By default, resources will be placed in internal flash and SDRAM. To use Octa Flash, add QUL_RH850_FLASH_TYPE=Octa to the CMake configuration options when configuring the application build. It's also necessary to specify the path to the eFlashLoad tool using the eFlashLoad_PATH configuration option, for example:

-DQUL_RH850_FLASH_TYPE=Octa -DeFlashLoad_PATH=C:\eFLASHLOAD_V307

The default value for QUL_RH850_FLASH_TYPE is Internal.

To use Octa RAM for the image resources, font files, or glyph data with ImageFiles.MCU.resourceCachePolicy, MCU.Config.fontFilesCachePolicy, or MCU.Config.glyphsCachePolicy respectively set to OnStartup, add QUL_RH850_RAM_TYPE=Octa to the CMake configuration options when configuring the application build:

-DQUL_RH850_RAM_TYPE=Octa

The default value for QUL_RH850_RAM_TYPE is SDRAM.

Loading resources to VRAM

In some cases, performance might be improved when loading resources to VRAM. When using ImageLayer, there can also be memory bandwidth issues that can be solved by placing some resources in VRAM. Images that are rotated or transformed are especially suited for being placed in VRAM.

To specify that a resource should be loaded to VRAM, set the ImageFiles.MCU.resourceRuntimeAllocationType property of the resource to 128 as follows:

ImageFiles {
    files: ["image.png"]
    MCU.resourceRuntimeAllocationType: 128
}

Custom layer requirements

On RH850, there are some special requirements for resources that are used as source for an ImageLayer.

Rendering errors might appear if using a resource placed in internal flash as the source of an ImageLayer inside a SpriteLayer. It's not recommended to use the NoCaching resource cache policy for these images. If the resource has to be kept internal flash, use a root level ImageLayer instead.

Resources used as the source of an ImageLayer inside a SpriteLayer need to have an eight byte aligned width. That means 32 bit per pixel images need to have a width that's a multiple of two, and 16 bit per pixel images need to have a width that's a multiple of four.

Resources used as the source of a root level ImageLayer need to have a 128 byte aligned width. That means 32 bit per pixel images need to have a width that's a multiple of 32, and 16 bit per pixel images need to have a width that's a multiple of 64.

Resources used as the source of a root level ImageLayer need to have an address alignment of 128 bytes, and the internal resource split image optimization needs to be turned off. This can be configured with the ImageFiles.MCU.Experimental.resourceAlignment and ImageFiles.MCU.resourceSplitImageOptimization properties:

ImageFiles {
  files: ["background.png"]
  MCU.Experimental.resourceAlignment: 128
  MCU.resourceSplitImageOptimization false
}

RLE image layers

To use RLE compressed images as the source for an ImageLayer, the RGB888RLE pixel format needs to be used.

ImageFiles {
  files: ["background.png"]
  MCU.resourceImagePixelFormat: "RGB888RLE"
  MCU.Experimental.resourceSplitImageOptimization: false
  MCU.Experimental.resourceAlignment: 128
}

Now the QML ImageLayer API can be used like this:

ImageLayer {
    source: "background.png"
}

It's also necessary to enable RLE support for the corresponding hardware layer using the Qt Quick Ultralite configuration API for Renesas RH850.

#include <rh850extras/rh850configuration.h>

Then set the layer type of the given hardware layer to Rh850::Configuration::Rle like this:

Rh850::Configuration::setLayerType(0, Rh850::Configuration::Rle);

In this case it's assumed that the bottom-most root layer will be an ImageLayer with an RGB888RLE image source. The RH850 supports up to four root layers. If several RLE image layers are needed, or if there should be any other layers below the RLE image layer, then you must adjust the layer indexes correspondingly when calling Rh850::Configuration::setLayerType.

Finally, you must link your application against Qul::PlatformRh850Extras:

target_link_libraries(<target> PRIVATE Qul::PlatformRh850Extras)

RLE image pixel format support

For normal images apart from ImageLayers, the RGB888RLE option of the ImageFiles.MCU.resourceImagePixelFormat property is not supported on RH850. For RLE compression of opaque images on RH850, it's recommended to use the AutomaticCompressedLossless option, as that will automatically choose the XRGB8888RLE option for opaque images.

ImageFiles {
   files: ["image.png"]
   MCU.resourceImagePixelFormat: "AutomaticCompressedLossless"
}

Renesas RH850 Extras module

Qt Quick Ultralite comes with a Renesas RH850 Extras module which includes additional APIs specific to Renesas RH850. To use these APIs, link Qul::PlatformRh850Extras to your project.

The following APIs are available through the extras module:

<rh850extras/rh850configuration.h>

Provides extra configuration functions for the Renesas RH850 platform

Available under certain Qt licenses.
Find out more.