2006-02-01 06:17 AM
2006-01-27 09:59 AM
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 Gawie2006-01-30 08:14 AM
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 Gawie2006-02-01 06:17 AM
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