cancel
Showing results for 
Search instead for 
Did you mean: 

Generate a 4Mhz clock

jorge2399
Associate II
Posted on January 09, 2007 at 09:38

Generate a 4Mhz clock

3 REPLIES 3
jorge2399
Associate II
Posted on January 09, 2007 at 05:38

Hi all,

Should it be possible to generate a clock of 4Mhz with a STR71x ?

Indeed, i need to generate a clock in order to drive a ic. so, i'm wondering if a timer (with ti_ocmpa output) is able to do such a frequency ?

My system is running at 60MHz (APB of TIM1 (with internal pll) )

Thanks in advance,

Regards,

kleshov
Associate II
Posted on January 09, 2007 at 09:31

The datasheet says that maximum allowed APB clock frequency is 33 MHz.

Using a timer, you can generate 1/2, 1/3, 1/4, 1/5 and so on fraction of APB clock frequency. See if one of those frequencies suits you.

Regards,

- mike

jorge2399
Associate II
Posted on January 09, 2007 at 09:38

Quote:

On 09-01-2007 at 14:01, Anonymous wrote:

The datasheet says that maximum allowed APB clock frequency is 33 MHz.

Using a timer, you can generate 1/2, 1/3, 1/4, 1/5 and so on fraction of APB clock frequency. See if one of those frequencies suits you.

Regards,

- mike

My APB clok is set to 24MHz.

So, a 24Mhz/6 giving 4MHz should interest me.

I didn't manage to have a higher frequency than around 1MHz (with prescaler =0)

Have you a code example?

Note: i tried this using tim1 as Output compare.

Thanks Mike

regards