cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin on stm32f4 discovery problem

sen
Associate II
Posted on September 21, 2013 at 08:30

     I'm using stm32f4discovery-BB board andTFT LCD (SSD2119 LCD driver) from Embest technology, I've ported all themodules on the Discovery with the help of the STemWin example on stm324xG-Evalboard as far as I understood. But now the display goes on blinking continuouslywhenever I run my program. Can someone suggest me what could be the problems Ineed to look back again???

  Also I couldn't make out why in the givenexample FSMC Bank 1 NOR/SRAM2 in initialised in SRAM_Init() while in actualparrarel interface for the LCD occurs in FSMC Bank 1 NOR/SRAM3...Please someonegive some clue. I'm trying out all sorts of modifications but unable figure outthe root of the problem. Something I must be missing. 

29 REPLIES 29
Posted on September 21, 2013 at 12:44

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/support%20for%20stemwin%20on%20stm32f4%20discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/AllItems.aspx&currentviews=55]Duplicative thread

You presumably have code from EmBest that demonstrates that the screen functions properly? Does that work?

If it works you need to study how the FSMC pins and bus are initialized, and subsequently how the display controller is initialized.

Use tools like WinMerge to understand differences in library code for other supported ST EVAL boards and the BB-LCD, and be through in your analysis.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sen
Associate II
Posted on September 21, 2013 at 16:02

Yes codes from Embest for the LCD and Touch controller works. And I ported the STemWin example according to that given code,have checked all the FSMC  pins. What seems to me that the call of the function ''GUI_Init()'' in the main gets stuck in an infinite loop. And never comes out of it. Is it because of some memory related peoblem? Because when my LCD blinks there is a strip or a colour line comes up on the screen. Very strange!!

Posted on September 21, 2013 at 16:39

The infinite loop in GUI_Init() is because you don't have the clock to the CRC unit enabled.

Add

  /* Enable CRC clock */

  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);

Prior to calling the function.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STemWin%20GUI_Init%28%29%20crashed&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=235]STemWin infinite loop thread
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sen
Associate II
Posted on September 21, 2013 at 19:28

BSP_Init() function is called before GUI_Init(), and the former has the CRC clock enabled within it. Configuration didn't look to be difficult reading the Segger emWin manual, but still can't figure out what's wrong happening inside. May be need to go through the whole thing few more times again...Thanks for the help Mr. Clive, will be back shortly with some new queries on this!

totti001
Associate II
Posted on September 23, 2013 at 13:18

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6W2&d=%2Fa%2F0X0000000bph%2F5DVWIrixZL2_qVBFeQADkRrQk191jl03LMTg3IYxTxY&asPdf=false
Posted on September 23, 2013 at 13:43

Thanks

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sen
Associate II
Posted on September 23, 2013 at 18:33

Thanks Mr. toth janos. But would you mind to share your working emWin demo program for this discovery board. This is my mail id- sen.tapu@gmail.com . It would be a great great help if you share your code. Actually I've made all these porting stuffs. But my program gets stuck at Gui_Init() and never comes out. The evaluation board demo and also the manual says that this function should call GUI_X_Config() and then LCD_X_Config() should be called. But I find that that GUI_X_Config() is never called by GUI_Init().I've used STemWin520d_CM4_Keil.lib in my project. I'm working on making an NIR instrument and have to plot the graphs with this discovery kit on the LCD. I'm stuck at this point. Thanking in advance...Expecting a reply.

sen
Associate II
Posted on September 24, 2013 at 08:07

toth.janos i don't know how to thank you. It has worked with the slight changes in the address. many many thanx. It was a huge help.

sen
Associate II
Posted on October 01, 2013 at 15:35

There's bit more problem again with the emWin demo and my own design in GUI-Builder. I've used ''STMPE811QTR.c'' file for the TOUCH controller available in demo examples for stm32f4dis-bb with TFT-LCD  from Embest. Also tried the ''stm324xg_eval_ioe.c'' file too. The former is just the modified version of the later though. But my touch controller doesn't work properly. The cursor flies here and there whenever a touch is detected. Buttons don't respond  to the touch. What is needed to be done for the touch function??? Have your demo for emWin worked properly with touch function Mr. toth.janos?