Skip to main content
Graduate II
July 27, 2020
Question

[BUG] STM8S_StdPeriph_Lib wrong Flag definitions

  • July 27, 2020
  • 0 replies
  • 525 views

In STM8S_StdPeriph_Lib V2.3.0 (last version?) in file stm8s_clk.h in CLK_Flag_TypeDef

are wrong defined

CLK_FLAG_CCOBSY = 0x0504

CLK_FLAG_CCORDY = 0x0502

it should be

CLK_FLAG_CCOBSY = 0x0540

CLK_FLAG_CCORDY = 0x0520

according to header file definitions

#define CLK_CCOR_CCOBSY   ((uint8_t)0x40) /*!< Configurable clock output busy */

#define CLK_CCOR_CCORDY   ((uint8_t)0x20) /*!< Configurable clock output ready */

that mistake leads to unpredictable behavior because it reads CCOSEL bits combination instead of flag status !

    This topic has been closed for replies.