cancel
Showing results for 
Search instead for 
Did you mean: 

STR712 Clock

gawied
Associate II
Posted on February 01, 2006 at 15:17

STR712 Clock

3 REPLIES 3
gawied
Associate II
Posted on January 27, 2006 at 18:59

Hi All

I am using the IAR STR712 KS kit. I modified the rccu example that comes with the STRxLib so that MCLK and PCLK1/2 are all on 32MHz. The LED is also toggled. Code are listed below:

RCCU_Div2Config (ENABLE);

RCCU_FCLKConfig (RCCU_DEFAULT );

RCCU_PCLKConfig (RCCU_DEFAULT);

RCCU_MCLKConfig (RCCU_DEFAULT);

RCCU_PLL1Config (RCCU_PLL1_Mul_16, RCCU_Div_1) ;

while(RCCU_FlagStatus(RCCU_PLL1_LOCK)==RESET);

RCCU_RCLKSourceConfig (RCCU_PLL1_Output) ;

MCLKval=RCCU_FrequencyValue (RCCU_MCLK);

APB1CLKval=RCCU_FrequencyValue (RCCU_FCLK);

APB2CLKval=RCCU_FrequencyValue (RCCU_PCLK);

// Configure P1.8 as Output Push-Pull

GPIO_Config(GPIO1, 0x0100, GPIO_OUT_PP);

GPIO_BitWrite(GPIO1,8,1);

while(1)

{

delay(); // simple for loop

GPIO_BitWrite(GPIO1, 8,~GPIO_BitRead(GPIO1,8));

}

My problem is that the code is executing for a few minutes and then it stops. Does anybody know what can be wrong?

Cheers

Gawie

gawied
Associate II
Posted on January 30, 2006 at 17:14

Hi All

I have found the problem. In the end it had nothing to do with the clock setup, but it was due to faulty HW!!

Cheers

Gawie

gawied
Associate II
Posted on February 01, 2006 at 15:17

Hi Zouh

Yes, I can confirm that there was some hw fault (dry joint, or something) on my STR712 KS kit. I had it replaced and my code is working fine now.

Thanks,

Gawie