Topic : Problem with STR9x and FMI

Forum : ARM

Original Post
Post Information Post
March 12, 2008 - 1:41pm
Guest

Hi friends,
I'm newbie to str9x and RIDE. I used to work (successfully) with atmel and winarm for arm9 CPUs.
Nowadays, I'm using RIDE 6.10.22 with ARM toolchain 1.1.15.
I'm running my application from flash.
I'm using STR9 Lib to setup the flash memory interface (FMI). Everytiime i run FMIConfig the processor seems to freeze.
Before executing FMIConfig i'm running a basic SCU Configuration where i enable some clocks.
The base code is:

   SCU_AHBPeriphClockConfig(__DMA,ENABLE); 
   DMA_DeInit(); 

   SCU_AHBPeriphClockConfig(__FMI, ENABLE);
   SCU_AHBPeriphReset(__FMI, DISABLE);
   SCU_FMICLKDivisorConfig(_FMICLK_Divisor);

   SCU_APBPeriphClockConfig(__GPIO0 ,ENABLE);
   GPIO_DeInit(GPIO0);
   SCU_APBPeriphClockConfig(__GPIO2 ,ENABLE);
   GPIO_DeInit(GPIO2);
   SCU_APBPeriphClockConfig(__GPIO3 ,ENABLE);
   GPIO_DeInit(GPIO3);
   SCU_APBPeriphClockConfig(__GPIO5 ,ENABLE);
   GPIO_DeInit(GPIO5);
   SCU_APBPeriphClockConfig(__GPIO6 ,ENABLE);
   GPIO_DeInit(GPIO6);

   SCU_AHBPeriphClockConfig(__EMI,ENABLE); /*enable EMI clock*/
   EMI_DeInit();      /*EMI out of RESET state*/

   SCU_APBPeriphClockConfig(__UART0, ENABLE);
   UART_DeInit(UART0);

   //and then...
   FMI_Config(FMI_READ_WAIT_STATE_3, FMI_WRITE_WAIT_STATE_1, FMI_PWD_DISABLE,
                    FMI_LVD_DISABLE, FMI_FREQ_HIGH);//wait states & LVD config
   //freezes
}

I'm missing something ?
Should any PLL be configured before this ?
Thanks for the attention
TudaDocHel
l
Replies
Post Information Post
+1
0
-1
March 13, 2008 - 9:23am
Guest

Hi,
The FMI_Config() should be executed from SRAM when booting from bank1 to avoid Read-While-Write from the Same Bank.
For more details about the SCU configuration please refer to STR91x examples.
Rgds

+1
0
-1
March 21, 2008 - 2:08pm
Guest

Hi to you all.
I was booting from bank 0.
The problem were related to a bad power supply.
Everytime i was enabling some board clocks, the power consumption grows, and my external power supply wasn't able to maintain the voltage level.
The LVD circuitry was booting the processor constantly.
Replaced the power supply by a stronger (12V regulated) one....
Everything is fine...
Thanks for all support
TudaDocHell