cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747i-Disco + STemWIn samples in + STM32Cube_FW_H7_V1.11.1 dont work

ManuelOV
Associate II

Board STM32H747i-DISCO

ID - STM32CubeIDE 1.14.0
Samples from STM32Cube_FW_H7_V1.11.1

stm32h747i_discovery_conf.h in common folder modified with

/* LCD controllers defines */

#define USE_LCD_CTRL_OTM8009A 0U
#define USE_LCD_CTRL_NT35510 1U

#define USE_LCD_CTRL_ADV7533 0U

 

Compiled build and send to board, but dont work.

some text are visible in the LCD but look like after the first prints, the

next text or draws are not send to the buffer, or buffer is not send to the display or.....

 

Here is the display from the example HelloWorld using the 2DGL_DrawPolygon.c from

http://www.segger.com/emwin-samples.html

the Maintask call to :DrawPolygons() and this is the source

static void _DrawPolygons(void) {

int y;

 

y = 90;

//

// clear display

//

GUI_SetBkColor(GUI_BLACK);

GUI_Clear();

//

// display text

//

GUI_SetColor(GUI_WHITE);

GUI_SetFont(&GUI_Font24_ASCII);

GUI_SetTextAlign(GUI_TA_HCENTER);

GUI_DispStringAt("DrawPolygon - Sample", 160, 5);

GUI_SetFont(&GUI_Font8x16);

GUI_DispStringAt("using", 5, 40);

GUI_DispStringAt("GUI_FillPolygon", 5, 55);

GUI_SetTextAlign(GUI_TA_HCENTER);

GUI_DispStringAt("Polygons of arbitrary shape\nin any color", 160, y + 90);

//GUI_Delay(500);

//

// draw filled polygons

//

while (1) {

GUI_ClearRect(100, y, 220, y + 85);

GUI_SetColor(GUI_BLUE);

GUI_FillPolygon (&_aPointArrow[0], 7, 160, y + 80);

GUI_Delay(1000);

GUI_ClearRect(100, y, 220, y + 85);

GUI_SetColor(GUI_RED);

GUI_FillPolygon (&_aPointStar[0], 8, 160, y + 45);

GUI_Delay(1000);

GUI_ClearRect(100, y, 220, y + 85);

GUI_SetColor(GUI_GREEN);

GUI_FillPolygon(&_aPointHexagon[0], 6, 160, y + 45);

GUI_DispStringAt("Polygons of arbitrary shape\nin any color", 16, y + 90);

GUI_Delay(1000);

}

}

 

And as you can see in the picture, only few text are in the LCD but not the Polygon,

If you remove the first Delay, you can see some polygon. but not more.

 

I am doing something bad? I forgot something in the configuration for the examples?

Thanks

IMG_9791.jpg

 

 

9 REPLIES 9
Imen.D
ST Employee

Hello @ManuelOV,

GUI_Init must be called before any STemWin function is used.

Note that before initializing the GUI, the CRC module (in RCC peripheral clock enable register) should be enabled.

More details can be found in the chapter "4 How to use STemWin Library step by step" in the AN4323 Application note.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
ManuelOV
Associate II

Absolutely, both are sett and call before, Tak ein mind, what is not working is the example, I have only include the STemWin file, but if you use the standar helloword, and add a loop to write other text in different places will notice dont work

 

In main.c

line 135 and forward

/* Init the STemWin GUI Library */

BSP_SDRAM_Init(0); /* Initializes the SDRAM device */

__HAL_RCC_CRC_CLK_ENABLE(); /* Enable the CRC Module */

 

GUI_Init();

 

GUI_SetFont(&GUI_Font32_ASCII);

 

GUI_DispStringAt("Starting...", 0, 0);

 

/* Initialize LCD and LEDs */

GUI_DispStringAt("Initializing lcd...", 0, 32);

 

/* Activate the use of memory device feature */

WM_SetCreateFlags(WM_CF_MEMDEV);

 

MainTask();

 

Main task call to the STemWin loop

ManuelOV
Associate II

Maybe dot was clear in my response, I did it previously, so your reply is not helpful

Please if you are part of ST please check the samples in the board, and will notice most of them dont work.

If you are employee of ST and dont have access to this board with this display, please ask to the people in charge of the board and let him the software must be fixed.

THANKS

FBL
ST Employee

Hello @ManuelOV 

It is preferable to avoid duplicating threads with same content to help us track issues and avoid asking different subjects in the same threads (ethernet LWIP and LCD ....)

 

Thank you for your understanding.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ManuelOV
Associate II

You are absolutely right.

first post was about how to include in the last repository for the h747i disco the modification to use the new display with the StemWIn library, really was a "novato" ask about github, and really would be more smart ask in github.

After open the post, I did notice the STemWin had included the modifications for the display. And I ask pardon in the post I point to readers about my error and where is the STemWin placed,  

Once I was enable to build the examples for the STEmWin I take notice any of them work ok, and the repository is not checked with the new display, and I open this thread.

Some of you reply me in the other post, and other of you, reply me here telling something about I must initialize the GUI.

Anyhow, as you already know the library for the new display have bugs, and dont work, and the people in charge of test it, have not test it before put the boards in the street.

It is preferable, dev boards with hardware modifications will be delivered once the software has been tested.

 

About asking for LCD Ethernet etc in the same post, Well, The LCD in the main issue, so have absolutely all the sense, and ask about the Ethernet, maybe was not appropriate, OK, I will open a thread about if once the LCD issue will be solved.

Thanks for your understanding

ManuelOV
Associate II

Now I will continue with the testing of the board with the files modified according your suggestions
THANKS a lot

ManuelOV
Associate II

I have compiled (build) the example with my modification to check if the double buffer work, and not yet, even with your news files in my local repository, do not work, I must do something bad.

 

Any how, would you be as kind to test in your computer if the project work?

in the 747i-disco choose the LCD_DSICmdMode_DoubleBuffer_CM7 and inside look for the main.c file

 

As you already now, this file show alternatively two images. copying the image to the front buffer.

To check if the library work with the double buffer I use the UTIL_LCD_DisplayStringAt(X,Y, (uint8_t *)"Prueba",RIGHT_MODE); to write "Prueba" in the display, and no matter with buffer will be in this moment the assocated with the back_buffer must be used for the UTIL library, and the text must be displayed in the next frame, or viceversa, just as I has not read the whole source code.

Instead write Prueba every time in the display, only print the text one time yes and the next no, and you can see the flick.

Please replace the original main loop for this one in the main file, and please download it in the board, and let me know if in you system the text "prueba" flik or is printed all the times?

/*Refresh the LCD display*/
HAL_DSI_Refresh(&hlcd_dsi);
uint16_t X=0;
uint16_t Y=0;
/* Infinite loop */
while (1)
{
if(pend_buffer < 0)
{
/* Prepare back buffer */
// DrawProp.LcdLayer = (uint32_t)(1- front_buffer);
UTIL_LCD_DisplayStringAt(X,Y, (uint8_t *)"Prueba",RIGHT_MODE);
X++; if(X>=480) X=0;
Y++; if(Y>=480) Y=0;
CopyBuffer((uint32_t *)Images[ImageIndex++], (uint32_t *)Buffers[1- front_buffer], 240, 160, 320, 240);
pend_buffer = 1- front_buffer;

if(ImageIndex >= 2)
{
ImageIndex = 0;
}

/* Refresh the display */
HAL_DSI_Refresh(&hlcd_dsi);

/* Wait some time before switching to next stage */
HAL_Delay(100);
}
}

Thanks

ManuelOV
Associate II

If in your system work, I have done something bad, if in your system dont work and flik, the double buffer system continue with some bug.

Wait your news to check all the files or help in other way
Cheers

FBL
ST Employee

OK I will do the test on MB1166-A03 revision to see if the issue is software or hardware.

Please send me your project in private message.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.