Jump to content

STM32F3 Discovery + HY32D (ILI9325)

Recommended Posts


I have STM32F3 Discovery board and 3.2" LCD driven by ILI9325. It was hard battle to make it working due to drivers. Fortunately I found this link (actually it is the same LCD and the same place where I bought it through ebay) and used the initialization part from there. When I modified the initialization part of gdisp_lld_ILI9325.c driver, it worked fine until I tried to rotate the screen - if some rotation (other than 0) was set in gfxconfig, then the screen was rotated but also mirrored. 

So I tried to update gdisp_lld_ILI93xx.c and now it works properly including rotation. I did not connect touch screen yet, I want just to try to display some GUI without touch-control.

Then I tried to generate some simple page with the use of the Studio - blue Container and couple controls on it.


When I integrated the output from Studio into my project, I found that the Container is not visible neither text on the controls.



I do not know if I missed something in configuration or something like that. The "Resources" folder in the output from Studio is empty.

Does anybody have any idea where the problem could be? Thanks!






uGFX Studio project:


Edited by Radek
Link to post
Share on other sites

Okay, so the visibility of the Container was about widget styles in gui.c. Although the customStyle of the controls was set to 0, they used the style of their parent (the Container). I set them to WhiteWidgetStyle as a default. Maybe I do not use it properly but actually solved. 

I also updated the initialization part in gdisp_lld_ILI93xx.c according to user manual, gamma settings looks better.

The only thing which I can not solve now is the rendering of text.. O.o


Link to post
Share on other sites

It is a very good idea when working with a new display to try the various gdisp demos first. These can help hilight problems related to gamma, different drawing mechanisms, rotation etc.

Start with the gdisp basics demo and then try the text demo. They will help you find where any problems might be.

Link to post
Share on other sites

Also, regarding the display controller initialization: This is an issue we're aware of. The current display driver interface is an artifact of when I started the library six years ago. Many things changed in that time especially our knowledge of how to handle something like this. Unfortunately, it's not possible to have just one ILI9341 driver that will always work as there are different chip revisions that require different initialization. Furthermore, the initialization depends on the attached display panel and so on.
For this reason, µGFX 3.0 will have a different way of handling initialization. There will be an interface which allows you to overwrite the initialization sequence from the application level.

Link to post
Share on other sites

@inmarket Thanks for your reference to the demos, I will continue there.

@Joel Bodenmann#1 Okay, that makes sense. I just don't understand why the style of the container was not visible/still default although it's custumStyle was set to the blue Widget_Style. Once I set it in Target Settings -> GWIN, I have most likely overridden the default style. The container was finally blue but including the other controls, so I set them back to default WhiteWidgetStyle and that is how I achieved the same look as in the µGFX-Studio.


@Joel Bodenmann#2 Yes that is simply not possible to maintain all the revisions and combinations of the display modules which are often not documented well. You would not do anything else. It would be nice if it worked out of the box but the number of the µGFX framework developers is definitely much less than number of Chinese producing new modules. :) It is a good idea to have a chance to override some parts of the drivers which can vary from the outside. Although it is not problem to simply copy some existing driver and modify it, then the hardware related code is still at one place. But it is up to users how to manage different versions.  



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...