Topic : STM32 and FSMC+LCD project works with V3.1.2 but not with 3.4.0

Forum : ARM

Original Post
Post Information Post
March 29, 2011 - 11:10pm
Guest

Hi.
Originally I made a project in V3.1.2, and it is still working, controlling a 7" LCD connected to an STM32F103ZGT6.
Though now I upgraded the StdPeriph library, as I was having some problems with I2C, and now FSMC stopped working completely.
When I try to write to the LCD->LCD_REG, I never comes any further, it just hangs at that "register write" command.

Do you have any idea why this might happen?

Best Regards
Thomas Jespersen

Replies
Post Information Post
+1
0
-1
March 31, 2011 - 5:26pm
Guest

No one with a clue?
I have attached the project so you can have a look.
So I definitely think it's a FSMC related problem, but sometimes it works and other times it doesn't. It worked in the debugger once, but when I then ended the debugging and just reprogrammed the STM32, it didn't work. Though the "refresh rate" of the LCD is much slower, when it sometimes works, than it was when it worked without any problems!?
Sometimes I also get an error from the RLink, telling me that the processor had stopped responding, and then it quits debugging.

I've done some more debugging, and the the STM32 hangs when I try to write to the RAM.
It can initialize the FSMC and GPIO fine, and it can write to the Register (LCD->LCD_REG), but when I try to write to the RAM, it hangs (LCD->LCD_RAM).

This is my definitions of the LCD FSMC port:
typedef struct
{
__IO uint16_t LCD_REG;
__IO uint16_t LCD_RAM;
} LCD_TypeDef;

/* Note: LCD /CS is CE4 - Bank 4 of NOR/SRAM Bank 1~4 */
#define LCD_BASE ((uint32_t)(0x60000000 | 0x0C000000))
#define LCD ((LCD_TypeDef *) LCD_BASE)

The project can be downloaded here: http://www.tkjelectronics.dk/GUI_Application.zip
I'm really looking forward to an answer :)

Best Regards
Thomas Jespersen

+1
0
-1
April 1, 2011 - 8:23pm
Guest

Hi again.
I think I've found the problem! The problem occours when using the new StdPeriph library (STM32 driver), V3.4.0.
When I switched to the older, V3.1.2, everything worked fine, no FSMC problems at all!
So there might be a problem with FSMC in V3.4.0 of the StdPeriph_Driver library.

Best Regards
Thomas Jespersen