STMicroelectronics STM8 Manual page 33

Table of Contents

Advertisement

CLK_CCOConfig(CLK_OUTPUT_CPU);
CLK_CCOCmd(ENABLE);
while(CLK_GetFlagStatus(CLK_FLAG_CCORDY) == FALSE);
}
void GPIO_setup(void)
{
GPIO_DeInit(LED_port);
GPIO_Init(LED_port, LED_pin, GPIO_MODE_OUT_OD_HIZ_FAST);
}
Explanation
The full explanation of this code is given in the last segment of this article. The only thing I'll describe
here is this part:
CLK_CCOConfig(CLK_OUTPUT_CPU);
CLK_CCOCmd(ENABLE);
while(CLK_GetFlagStatus(CLK_FLAG_CCORDY) == FALSE);
These lines select the clock source that the CCO pin will output, enable the CCO module and wait for
it to stabilize. Here I selected the CCO to output CPU clock.
Demo
Video link:
https://www.youtube.com/watch?v=IeLUc_s3jBE

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM8 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF