Skip to main content
markgilson9
Associate III
July 12, 2012
Question

MCO <= 30Hz ?

  • July 12, 2012
  • 4 replies
  • 943 views
Posted on July 12, 2012 at 18:32

I'm wondering if it's possible to generate a clock (or 1PPS) on the MCO pin?  I'm just not sure how far down you can divide this clock...  If this isn't feasible, is it possible to generate a 1PPS with the RTC?

    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    July 12, 2012
    Posted on July 12, 2012 at 19:02

    Don't think so. Can you use a TIM output in PWM?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    markgilson9
    Associate III
    July 12, 2012
    Posted on July 12, 2012 at 19:15

    Ummm, if the STM32F4 can do that, then yes.  This doesn't really have to be a 50% duty cycle standard clock.  All I'm looking for is sub 30Hz pulses.  1PPS is desired, but multiple would be ok as well...I'll be driving the input to a frame sync pin on another part.  Would I be able to use PWM to generate such an external pulse at said rate?

    Tesla DeLorean
    Guru
    July 12, 2012
    Posted on July 12, 2012 at 19:23

    Sure.

    Assuming a 84 MHz, or 168 MHz input, set the prescaler to 42000-1, and then period to 2000-1 or 4000-1 respectively, and then set the width to a 100 or so, or 2000/2

    Want finer granularity a prescaler of 4200-1, or some other factored combination.
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    markgilson9
    Associate III
    July 12, 2012
    Posted on July 12, 2012 at 19:27

    Alright, I'll take a look at this.  As always, thanks clive!