cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin in landscape with Cube + STM32F429discovery

aki
Associate
Posted on April 16, 2014 at 11:37

I'm having problems to produce correctly working landscape LCD with STemWin and STM32F429 discovery. I'm using STemWin_HelloWorld application from STM32Cube_FW_F4_V1.1.0 as a base for my tests. I don't need to rotate screen during run-time.

I have only changed display drivers in LCDConf from GUIDRV_LIN_32 to GUIDRV_LIN_OSY_32 to produce landscape screen. This results correctly oriented screen with correctly printed texts with GUI_DispStringAt(). But background and painting functions like GUI_FillCircle() will create three striped areas on top of each others. Looks like a synchronisation problem but haven't manage to sort it out. Furthermore wondering why texts are working correctly and drawings not. Changing physical size to 240x240 fixes the problem - except it's not full screen and 320 width.

https://scontent-a-ams.xx.fbcdn.net/hphotos-ash3/t1.0-9/10246499_672755232786025_2797032601679556975_n.jpg

.

Application code for this image:

  GUI_SetFont(&GUI_Font20_1);

  GUI_DispStringAt(''Hello world!'', (LCD_GetXSize()-100)/2, (LCD_GetYSize()-20)/2);

  GUI_DispStringAt(''0'', 0, 0);

  GUI_DispStringAt(''1'', 100, 0);

  GUI_DispStringAt(''2'', 200, 0);

  GUI_DispStringAt(''3'', 300, 0);

  GUI_DispStringAt(''A'', 0, 100);

  GUI_DispStringAt(''B'', 0, 200);

  GUI_DispStringAt(''C'', 0, 300);

  GUI_FillCircle(100, 100, 10);

Any ideas to fix this problem?

18 REPLIES 18
Noppe.Jack
Senior
Posted on April 20, 2014 at 01:14

I am experiencing something very similar. I used the Demonstration as a starting point, and in the file: LCDConf_stm32f429i_disco_MB1c I added a new define called LANDSCAPE, so that I can clearly show the parts of the code that I changed. Here are the affected snippets:

#ifndef LANDSCAPE
#define LANDSCAPE
#endif
#ifdef LANDSCAPE
#define LCD_MIRROR_Y 0
#define LCD_MIRROR_X 1
#define LCD_SWAP_XY 1
#else
#define LCD_MIRROR_Y 1
#define LCD_SWAP_XY 1
#endif
... and ....
#ifdef LANDSCAPE
#define COLOR_CONVERSION_0 GUICC_M565
#define DISPLAY_DRIVER_0 GUIDRV_LIN_OSX_16
#else
#define COLOR_CONVERSION_0 GUICC_M565
#define DISPLAY_DRIVER_0 GUIDRV_LIN_16
#endif
#if (GUI_NUM_LAYERS > 1)
#ifdef LANDSCAPE
#define COLOR_CONVERSION_1 GUICC_M8888I
#define DISPLAY_DRIVER_1 GUIDRV_LIN_OSX_32
#else
#define COLOR_CONVERSION_1 GUICC_M8888I
#define DISPLAY_DRIVER_1 GUIDRV_LIN_32
#endif
#endif

I then run the calibrate routine from the demo, and this is what the screen looks like on boot ... Landscape works, and the text displays correctly, but the rest of the background looks like it is out of sync or something. I can't help but wonder if there is a problem with the '_OSX_' versions of the driver files? Or am I missing some other important change required in the code? 0690X00000603QbQAI.jpg And then it get's worse, when the next screen paints .... 0690X00000603QfQAI.jpg
aki
Associate
Posted on April 23, 2014 at 08:03

Looks like exactly the same problem.

I have also noticed that bitmaps (tested jpg and bmp) will be painted correctly as are the texts. But everything like clear, fill some area or paint some shape will be messed.

Anyone sorted this out?
Noppe.Jack
Senior
Posted on May 09, 2014 at 18:01

There is a similar discussion on the STEGGER (makers of emWin) forum. The support guy there said that he is looking into it, but it seems like forever and no answer yet. 

Please add your voice to that discussion ... perhaps it will accelerate a solution :)

http://i111.indigo.fastwebserver.de/index.php?page=Thread&postID=5860#post5860

Thank you in advance :)

Posted on May 09, 2014 at 18:37

Please add your voice to that discussion ... perhaps it will accelerate a solution :)

Because forum admins always love hearing from nagging indirect customers, presumably part of the OEM agreement is that ST provide front line support for STemWin

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Noppe.Jack
Senior
Posted on May 09, 2014 at 18:59

I believe in promoting constructive discussion, so will indirectly comment on the response to my earlier invitation for people to add their voice to the Stegger forum discussion.

  1. The invitation was implicitly aimed at people who are legitimately experiencing the same problem.
  2. The Stegger forum admin has already offered to look into this problem, from which I inferred that they are willing to investigate, despite the fact that this is an OEM issue.
  3. Any organization has to prioritize their support issues, and usually find an indicator of how many customers are affected, a helpful input. 

I hope this helps to clarify the constructive intent of my previous post.

Posted on May 23, 2014 at 14:53

Hi,

The issue is already detected, and is now under investigation.

You will be notified once the root's issue is identified.

With regards.

Posted on May 28, 2014 at 19:05

Hi,

We had confirmation that Landscape mode is not possible in RGB mode with LCD screen controller of STM32F429-Discovery kit.

So unfortunately today, we can't demonstrate LCDorientation swap using the STM32F429-Discovery kit.

Noppe.Jack
Senior
Posted on May 29, 2014 at 23:11

Hi Heisenberg,

Can you please give more information on this? A discussion on the same topic, on the SEGGER forum, had a response from one of the employees, Adrian, in which he demonstrates that it is in fact possible.

There are two obvious differences in his setup that I can see ...

  • He uses std_lib, not stm32cube libraries
  • He uses EmWin 5.24 where stm32cube bundles version 5.22

I'd appreciate if you can give us some insight into why you think his setup works and why the STM32Cube setup is not supported?

Tx in advance.

Noppe.Jack
Senior
Posted on May 29, 2014 at 23:31

Correction ... I meant StdPeriph (where I said std_lib)