Skip to main content
Visitor II
January 5, 2011
Question

Please HELP. STM8L+DAC

  • January 5, 2011
  • 3 replies
  • 767 views
Posted on January 05, 2011 at 18:19

Please HELP. STM8L+DAC

    This topic has been closed for replies.

    3 replies

    Visitor II
    May 17, 2011
    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

    Visitor II
    June 1, 2011
    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

    Visitor II
    June 1, 2011
    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