cancel
Showing results for 
Search instead for 
Did you mean: 

Use emwin with STM32F207 & SSD1963

aman4kamboj
Associate II
Posted on July 07, 2014 at 14:14

I want to use STemwin GUI library for one of my project. Interfaced successfully STM32F207 with SSD1963 LCD driver (480x272). But when used emwin library standalone application it gets hardfault handler after GUI_X_Init. Seen on disassembly there was some register data corrupted. Changed the SRAM driver as according to my target device & also changed the LCD display initialization routine as my LCD is not on FSMC, its' on simple GPIO data lines.

Please suggest if anyone used emwin without LCD on FSMC.

5 REPLIES 5
gvigelette
Associate II
Posted on July 07, 2014 at 15:52

The easiest way to get the display running would be to connect it to the FSMC lines and use the Flex Driver in Emwin.  I have used this method with the cube software successfully.  I did also get gpio and spi versions of other graphics controllers working with cube and should be similar to what you are trying to do.  Did you start with the driver template and just implement read and write pixel (this is the bare minimum needed to get the driver working, it will be slow but it will ensure that everything is working properly)?

Thanks,

George

aman4kamboj
Associate II
Posted on July 08, 2014 at 06:21

Thanks George,

My LCD is working fine & displaying images icons but i want to use emwin so that i can easily make interactive GUI's. It may be a little bit confusing for me. As i am using the standalone application of stemwin & change the bsp drivers for LCD, LCD driver ssd1963 & for SRAM. But in GUI_Init, it gets stuck up after GUI_X_Init. May be the issue is related to memory allocation. Can you please tell me the step which i need to take care to run emwin with my LCD.

rigomate2
Associate II
Posted on July 08, 2014 at 14:09

I'd bet that the CRC peripheral is not enabled.

The StEmwin is a precompiled library from Segger's Emwin. It does only run on ST MCUs. It uses the CRC peripheral to do some ''magic'' to see if the code is actually running on a STM32 MCU.

So make sure that the proper RCC init function is called to enable the CRC peripheral.

Cheers

aman4kamboj
Associate II
Posted on July 08, 2014 at 14:25

Hi Rigo,

RCC enabled in code init. There is some other issue, it gets hard fault handler after GUI_X_Init. Thats for init routine:

 BSP_TSC_Init();

 

  STM322xG_LCD_Init();

 

  /* Initialize the SRAM */

  SRAM_Init();

  /* Enable the CRC Module */

  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE);  CRC RCC is enabled here in device init.

Regards,

Aman
Posted on July 08, 2014 at 16:08

Ok, so look at where it's Hard Faulting!

Chances are you are passing in a memory address which is out of scope.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..