Skip to main content
Visitor II
January 9, 2007
Question

Generate a 4Mhz clock

  • January 9, 2007
  • 3 replies
  • 911 views
Posted on January 09, 2007 at 09:38

Generate a 4Mhz clock

    This topic has been closed for replies.

    3 replies

    jorge2399Author
    Visitor II
    January 9, 2007
    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,

    Visitor II
    January 9, 2007
    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

    jorge2399Author
    Visitor II
    January 9, 2007
    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