cancel
Showing results for 
Search instead for 
Did you mean: 

STM8L HSE Clock issues

d2snap
Associate II
Posted on April 10, 2011 at 09:59

STM8L HSE Clock issues

2 REPLIES 2
fggnrc2
Associate II
Posted on May 17, 2011 at 15:12

Hello Marc.

There is a simpler way of testing STM8L clock frequency.

Every STM8L microcontroller has got a Configurable Clock Output (CCO).

The CLK_CCOR peripheral register controls the clock source and its prescaler.

If you write 0x08 to CLK_CCOR, the CCO pin will output the HSE clock frequency.

The frequency which your code outputs is slower because the STM8 code executes some instructions which take some clock cycles to execute.

If you want an exact count, please, have a look at the compiler output.

Regards

EtaPhi

d2snap
Associate II
Posted on May 17, 2011 at 15:12

Thanks,

I've checked the clock output. The clock works fine.