Jump to content
Radek

STM32F3 Discovery + HY32D (ILI9325)

Recommended Posts

Hi,

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.

image.png.7b46edf5b52ed103c98432826c2f5268.png

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

image.png.a11bb2aa2a56057eb381a550ab8ce6d5.png

image.png.e78d79803ad9a84b54b9a020cf26daad.png

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!

Driver:

gdisp_lld_ILI93xx.c

board_ILI93xx.h

Config:

gfxconf.h

uGFX Studio project:

demo.zip

Edited by Radek

Share this post


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

 image.png.88d0558f86b0885a29336addc7b53f79.png

Share this post


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.

Share this post


Link to post
Share on other sites

From your first screenshot it looks like you added a container on the display page which covers the entire display area. That is not necessary as the µGFX-Studio always generates that container by default (it's called the "display page").

Share this post


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.

Share this post


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.

image.png.97fbeb0b2805ebca51cfc57df270f8e0.png

@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.  

Thanks.

 

Share this post


Link to post
Share on other sites

Okay, the demos are very helpful, everything quite straightforward, just need to spend some time on it and with the documentation. Next step will be integration of FreeRTOS, that will be another story.. xD  Thanks!

image.png.72bea724871e59118c609deaefc839b3.png

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×