Skip to main content
Visitor II
August 11, 2021
Question

STM8S clock and serial port initialization problems

  • August 11, 2021
  • 1 reply
  • 621 views

I am using an IAR compilation environment, the microcontroller is STM8S105C4T6, but in the clock initialization, CLK__CKDIVR=0x00; the CLK__CKDIVR in this sentence keeps prompting that this function cannot be found.

And it is the same when initializing the serial port UART1. The header files used are stm8s.h and stm8s_uart1.h

May I ask what is the reason for this?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    August 11, 2021

    This looks like a typo: please replace CLK__CKDIVR by CLK_CKDIVR, i.e. with one underscore only.

    Does it work then?

    Regards

    /Peter