cancel
Showing results for 
Search instead for 
Did you mean: 

FSMC failure

fabiognudi9
Associate II
Posted on June 13, 2012 at 09:35

Hi, i am newby with arm cortex m3.

I am working on STM32F101xC and i have this problem:

driving a lcd with 8080 interface with FSMC i have no problem with st-link debugging and after a ''reset pin'' reset. After power on, the first attemp to use FSMC fails and the stm32 fails program execution, then after reset pin low all works well.

In debugging i have not the problem so i cannot understand. The hardware too seems to be ok.

Any hint? Thank you.

Fabio  
9 REPLIES 9
frankmeyer9
Associate II
Posted on June 13, 2012 at 14:21

I had a somehow similiar application, but GPIO driven, and in 6800 mode.

However, I remember the LCD driver my display used required a startup initialization in the range of milliseconds after power-on. You can check this in your LCD's datasheet.

Less probable is a power supply problem. Displays, especially with backlights on, can consume quite a lot of current. Several debug adapters can supply their target too, so this might mask the problem.

Posted on June 13, 2012 at 14:37

Maybe you need a bigger delays between each access.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
fabiognudi9
Associate II
Posted on June 13, 2012 at 14:47

Thanks for your answer, but:

- i tested a 5000ms initial delay and the problem is the same and i should have the problem with a reset pin too.

- a power supply problem it seems impossible because i am powering the backlight with a different power line and the scope tell me that is ok.

Maybe an initialization problem??

There is something different in power reset init?

I am using UART1, UART2, SYSTICK and FSMC.

When i attempt to do an external memory writing it fails.

   

fabiognudi9
Associate II
Posted on June 13, 2012 at 14:49

I cannot trace it because in debugging i have not the problem,

but it is the first attempt to fail.

frankmeyer9
Associate II
Posted on June 13, 2012 at 15:36

Do you wait that time before you initialize the FSMC ?

Have you tried some relaxed FSMC settings ?

fabiognudi9
Associate II
Posted on June 13, 2012 at 15:51

Yes after SYSTICK init i wait a big time and it don't change the problem.

Yes i tried to slow down clock, but it don't change.

Now i am tring some different FSMC time settings.

 

Posted on June 13, 2012 at 17:39

I cannot trace it because in debugging i have not the problem, but it is the first attempt to fail.

 

Instrument via the USART
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
emalund
Associate III
Posted on June 13, 2012 at 19:05

i tested a 5000ms initial delay and the problem is the same and i should have the problem with a reset pin too.

The only difference (I can visualize) between reset pin and power up reset is that the 8080 has had some time to wake up when you do the pin reset.

Did you insert the selay early enough? The 8080 based display unit will be in some state for a while during/after power on.

If the delay is inserted too late (i.e. not before initialization) you may upset the 8080 when the pins wiggle during init.

Erik
fabiognudi9
Associate II
Posted on June 14, 2012 at 15:37

I solved my problem, but i cannot understand why.

   // RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);

 

//wrong position

  GPIO_Config(); 

  FSMC_Init();

 

 

 

  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_FSMC, ENABLE);

 

// good position

Am i doing some other thing wrong??

Enabling FSMC clock after init solve my problem, but i saw some examples in which RCC setting is done before.

Could someone explain me this situation?

Thanks

i tested a 5000ms initial delay and the problem is the same and i should have the problem with a reset pin too.

The only difference (I can visualize) between reset pin and power up reset is that the 8080 has had some time to wake up when you do the pin reset.

Did you insert the selay early enough? The 8080 based display unit will be in some state for a while during/after power on.

If the delay is inserted too late (i.e. not before initialization) you may upset the 8080 when the pins wiggle during init.

Erik