Skip to main content
carnett1
Associate III
Dec 13, 2010 7:41 PM UTC
Question

Configurable clock output

Posted on December 13, 2010 at 20:41

I would like some information on configuring Port E0 to be a clock output of 4Mhz. Is their an example someplace.

charles

    This topic has been closed for replies.

    3 replies

    brazov22
    Associate III
    Dec 18, 2010 8:51 AM UTC
    Posted on December 18, 2010 at 09:51

    // configures CPU clock @4 MHz

    CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

    (, , );

    (

    );

    ();

    lowpowermcu
    Associate III
    Dec 20, 2010 4:10 PM UTC
    Posted on December 20, 2010 at 17:10

    Hi brazov,

    I am not sure but I think that the HSI oscillator is set to 16 MHz so we need to do the following config in order to output 4 MHz on CCO pin:

    CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV4);

    instead of

    CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);

    What do you think ?

    Regards,

    MCU Lüfter

    brazov22
    Associate III
    Dec 21, 2010 2:22 PM UTC
    Posted on December 21, 2010 at 15:22

    yes for sure, it was a typo error