I am new at this so please be gentle with me :) I am struggling to get the CCO pin to output the current clock frequency and I'm struggling. I have checked out the examples in the STM8S library (version 2.1), in particular the CLK_MaxSpeed example and I seem to be getting no where.
For the hardware I am just using the Discovery board and I have hooked a scope to CN4, pin 4 which I believe is the CCO pin.
For the software I have distilled the following from various examples:
// Initialise the clock
// CPU Prescaler = 1.
// Prescaler = 1.
// Output clock on CCO pin.
CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO, CLK_SOURCE_HSE, DISABLE, CLK_CURRENTCLOCKSTATE_DISABLE);
// Initialise GPIOs
GPIO_Init(GPIOC, GPIO_PIN_2, GPIO_MODE_OUT_PP_LOW_FAST);
// Config done.
The while loop is just me trying to get some other form of output to prove the program is actually running. I am not seeing any meaningful output on the scope for either CCO or the GPIO.
FYI - I am using the IAR environment.
Any help would be appreciated,