Skip to main content
mail2
Associate III
Jul 29, 2013 11:43 AM UTC
Question

STemWin GUI_Init() crashed

Posted on July 29, 2013 at 13:43

Hi,

I have Downloaded STemWin from the STM Website and i have tried to build a simple ''Hello World'' Application on my STM32F207 with KEIL 4.72a, but my Application goes into an infinite Loop in GUI_INIT().

I have found a hint onn the Segger Website, that GUI_Init() tries to acces the provided memory area with 8, 16 and 32 Bit accesses. This memory Area will be assigned by a call to GUI_X_Config() (provided by my code), but GUI_X_Config will never be called by GUI_Init().

I used the Library files STemWin520d_CM3_Keil.lib (without OS) and STemWin520d_CM3_OS_Keil.lib (with OS support). What can i do to find the problem?

Thanks

Martin

#stemwin
This topic has been closed for replies.

17 replies

Tesla DeLorean
Guru
Aug 1, 2013 3:04 PM UTC
Posted on August 01, 2013 at 17:04

Add

  /* Enable CRC clock */

  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);

Prior to calling the function.
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Nickname12657_O
Associate III
Aug 1, 2013 3:14 PM UTC
Posted on August 01, 2013 at 17:14

Hi Clive,

Thank you. This is correct and mentioned in our documentation to call that function prior to use GUI routines.  I thought that the default examples are used, which is active by default. 

Cheers,

STOne-32.

mail2
mail2Author
Associate III
Aug 1, 2013 3:31 PM UTC
Posted on August 01, 2013 at 17:31

Yes, that's it.

And yes, after searching for ''CRC'' in the documentation, i found a footnote(!) on page 6 of AN4323 about it.

Thank you again clive1.

Martin

Tesla DeLorean
Guru
Aug 1, 2013 3:42 PM UTC
Posted on August 01, 2013 at 17:42

I'm working blind with the register data you provided, the library is locked to STM32 hardware with this, presumably the F2 and F4, I didn't check the location on the F1

I think the documentation would have been a lot stronger if the main() example explicitly included this code. That note on the diagram is totally lost.

http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743/PF259225

0690X00000604rJQAQ.png

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ekondratiev
Associate II
Dec 14, 2013 11:56 AM UTC
Posted on December 14, 2013 at 12:56

Hello!

I had the same problem with GUI_Init(). MCU is STM32F103RC and all ports and all necessary buses are enabled. Display driver is S1D13700.

And it was solved after I've put 'alignment' attribute to emWin memory buffer.

U32 aMemory[GUI_NUMBYTES / 4] __attribute__((aligned (4)));

But now emWin halts on GUI_DEVICE_CreateAndLink !!!

P.S. emWin library from KEIL software.

Tesla DeLorean
Guru
Dec 14, 2013 12:32 PM UTC
Posted on December 14, 2013 at 13:32

I checked the CRC unit address, it is the same for the F1

The other issue could be an error or issue related to the buffer, the library can generate ASCII error messages, but you need to create a call back. You should also be able to dump the memory address via a memory view window and observe the error there.

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https%3a//my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/the%20STemWin%20used%20external%20SDRAM%20can%27t%20pass%20the%20GUI_Init&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=99

Or it could be something different, but I'd need to see the code involved, and the registers.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
jiri
Associate II
Feb 2, 2015 9:03 AM UTC
Posted on February 02, 2015 at 10:03

Thank you, clive1, I also crashet on CRC.

 I have a problem with oriented data storage in memory. I use library GUIDRV_LIN_1. Horizontal line is saved as 0xFF, 0xFF, ... and I need as 0x80, 0x80, ... I wanted to correct the orientation of the display in memory. Unfortunately, the options listed in heder file GUIDRV_Lin.h  such as GUIDRV_Lin_OS_1_API, GUIDRV_Lin_OY_1_API, GUIDRV_Lin_OX_1_API, ... not defined in STemWin524b_CM4_xxx.xxx library. It is available settings for STemWin some  that affect how store data in memory? Thanks for the answer. Jiri Svabik