Saturday, February 24th 2018, 2:48am UTC+1

You are not logged in.

  • Login
  • Register

abval

Beginner

Date of registration: Jan 25th 2018

Posts: 2

1

Thursday, January 25th 2018, 12:34pm

STM32H7 & emWin

Hi,

I am new to emWin and I'd like to have some information.

1) Do we need external SDRAM for frame buffer? if, yes how to calculate the size required?

2) I found a bit difficult to understand what functions should be implemented by the user. I am using a 10.1" display with RGB interface. I will use the LTDC module in ST.
Is there a file showing user's functions that need to be implemented?

3) Is there a diagram showing how the emWin lib is working? like init functions, periodic functions and callbacks?

Thanks for your help :) .

A.

SEGGER - Schoenen

Super Moderator

Date of registration: Aug 13th 2015

Posts: 496

2

Thursday, January 25th 2018, 1:37pm

Hi,

Quoted

1) Do we need external SDRAM for frame buffer? if, yes how to calculate the size required?
In general you don't need the external SDRAM. But if you want to use a large display you don't have another choice because you have to place the framebuffer somewhere in almost any case the internal RAM is not large enough.

For the framebuffer you can calculate the memory requirements as follows:

Pixel in x * Pixel in y * bytes per pixel * number of buffers * number of layers

Further you might want to place the GUI memory (a memory block dedicated to emWin where it can allocate memory from. This is independent of the framebuffer) int othe external RAM. This will allow you to allocate far more memory for emWin. Although, even 100K of memory can be enough depending on the application.

Number of buffer is the amount of buffers used for multibuffering.

Quoted

2) I found a bit difficult to understand what functions should be
implemented by the user. I am using a 10.1" display with RGB interface. I
will use the LTDC module in ST.

Is there a file showing user's functions that need to be implemented?
You have to initialize the LTDC and configure it to fit to your display. Of course, this includes the any other hardware which is required to drive the LCD (e.g. GPIOs).

Quoted

3) Is there a diagram showing how the emWin lib is working? like init functions, periodic functions and callbacks?
At first emWin tries to get some memory and it calls the function GUI_X_Config() where the function GUI_ALLOC_AssignMemory() should be called. The function GUI_ALLOC_AssignMemory() assigns a memory block to emWin. The GUI_X_Config() can be found in GUIConf.c.

After that emWin sets up the driver (most likely the GUIDRV_Lin driver) by calling LCD_X_Config(). Once this is done emWin calls the driver callback function LCD_X_DisplayDriver() with the command LCD_X_INITCONTROLLER. The user has to react on this command and initialize any hardware required to drive the LCD (e.g. initialize the LCD controller).

You might want refer to the latest stm32cubeh7 package offered by STM. Under 'STM32Cube_FW_H7_V1.2.0\Projects\STM32H743I_EVAL\Applications\STemWin\STemWin_HelloWorld\STemWin\Target\' you will find a GUIConf.c and LCDConf.c used for the STM32H7 and emWin. Also there should be some projects with emWin running on the STM32H7.

Regards
Sven

abval

Beginner

Date of registration: Jan 25th 2018

Posts: 2

3

Thursday, January 25th 2018, 2:05pm

Hi Sven,

Thanks for your reply. I will have a look at the file you mentioned.
As you said, I might look at SDRAM for the entire emWin. I have a big application to write ahead with ethernet, usb, fatfs, sdcard etc..

I might come back later with more questions :) .


A.