cancel
Showing results for 
Search instead for 
Did you mean: 

Clocks on the STR7

johnsim
Associate II
Posted on September 15, 2005 at 13:16

Clocks on the STR7

2 REPLIES 2
johnsim
Associate II
Posted on September 14, 2005 at 09:43

Hi,

I'm sure this is an easy one. I'm trying to set up clocks for the STR711, so that I can then build up my application from there. I set up the clocks as:

RCCU_Div2Config (ENABLE);

RCCU_PLL1Config(RCCU_PLL1_Mul_24, RCCU_Div_2);

RCCU_RCLKSourceConfig(RCCU_PLL1_Output);

RCCU_PCLKConfig(RCCU_RCLK_2);

RCCU_FCLKConfig(RCCU_RCLK_2);

I have a line to give me the clock frequency output via one of the software function calls where I can put a watch on the variable:

MCLK_Freq = RCCU_FrequencyValue (RCCU_MCLK);

But to see what the actual speed is, I generate waveform via Port 0 to see what speed the device is actually running at:

while(1)

{

GPIO_WordWrite(GPIO0, 0x0000);

GPIO_WordWrite(GPIO0, 0xFFFF);

}

I'm using IAR's embedded workstation with the IAR ST711 development board, which has a 4MHz clock source. Running in debug mode, the RCCU_FrequencyValue (RCCU_MCLK) reports back as 28MHz, but the waveform I get out is only 480kHz. While the chip seems to be running fast, it's real output is much much slower.

Single stepping through the code, it seems to be relatively efficient. But it's as if it's the chip is running at the speed of the JTAG interface, or not changed over to the PLL1 clock. Any suggestions? Should the chip run at full speed when in debug?

All the best,

John.

johnsim
Associate II
Posted on September 15, 2005 at 13:16

Hi Risc,

thanks for the help. I've put the code in as you quote, the resulting waveform is now at 240kHz. Changing the RCCU_Div_4 to a Div_2 I get back to the 480kHz I had before. Is this because I'm running in Debug mode? Does the chip not run at full speed in Debug mode?

Thanks,

John.