cancel
Showing results for 
Search instead for 
Did you mean: 

Init internal clock in assembler

normand
Associate II
Posted on March 25, 2011 at 15:44

Init internal clock in assembler

1 REPLY 1
fggnrc2
Associate II
Posted on May 17, 2011 at 15:12

Hello Normand!

As the ''STM8L15x and STM8L16x microcontroller family'' reference manual says, the STM8L152 startup clock is HIS (16 MHz).

However, the CLK_CKDIVR initial value is 3, so STM8L152 initially runs at 2 MHz.

To run it at 16 Mhz, all you need is:

CLR     CLK_CKDIVR

which sets HSI divider to 1.

Regards

EtaPhi