cancel
Showing results for 
Search instead for 
Did you mean: 

Please HELP. STM8L+DAC

giniyazovrr
Associate
Posted on January 05, 2011 at 18:19

Please HELP. STM8L+DAC

3 REPLIES 3
lowpowermcu
Associate II
Posted on May 17, 2011 at 15:11

Hi rais,

I think you should enable the comparator peripheral.

So call

CLK_PeripheralClockConfig(CLK_Peripheral_COMP, ENABLE);

before

SYSCFG_RIIOSwitchConfig(RI_IOSwitch_15, ENABLE);

You can check it by looking at switch state in register if the value is well  written or not.

Thanks to confirm this so we can share it.

MCU Lüfter

cspeckmann
Associate II
Posted on June 01, 2011 at 10:42

Hi,

I had the same problem.

Turning on comparator clock really helps.

Unfortunately, I cannot find any hint why this is necessary in the STM8L documentation (RM0031).

Regards

  Dilbert

lowpowermcu
Associate II
Posted on June 01, 2011 at 11:21

Hi Dilbert,

That was my case too but I found the info in RM0031:

''The RI registers can be accessed only when the comparator clock is enabled by setting the PCKEN25 bit in the CLK_PCKENR2 register.''

MCU Lüfter