cancel
Showing results for 
Search instead for 
Did you mean: 

memory read error after set FSMC clock

whe
Associate II
Posted on September 25, 2009 at 05:57

memory read error after set FSMC clock

3 REPLIES 3
whe
Associate II
Posted on May 17, 2011 at 13:23

Hi, there

My application code mainly need to be put in external flash so the FSMC interface has to be initialised before jumping into the application. The initialisation code is in internal flash (.init). I have written some loader code and have managed to flash the code in both flashes (.vector and .init is in internal flash, others in external) and verified OK but the code hangs at the point where sets the FSMC block clock(the pc is still in internal flash). The same code runs without problem if I put all code in internal flash. I am using STM32VE103 and Rowley IDE. I haven't got a clue where is the problem. Could any one help me out?

KR

Adam.

tomas23
Associate II
Posted on May 17, 2011 at 13:23

Are you sure all called functions are in internal FLASH only during init? Try to single-step in assembly debug window around the FSMC clock enable.

If you get an exception, you can check in the core (NVIC) fault address register, what is the address of instruction, that generates this fault. Check the ARM ARM or ARMv7M refman from www.arm.com.

whe
Associate II
Posted on May 17, 2011 at 13:23

Thanks for the reply. The problem has been solved by setting up the clock tree before FSMC initialisation.

KR

Adam