Hello, i have to solve the task: Configure the MCU to operate with a system clock frequency of 72MHz. Make sure that the clock signal is derived from the external oscillator (HSE). Find a way to show the system clock frequency (SYSCLK) at an output p
This is my code so far.
I solved the clock frequency of 72MHz with an excel sheet and imported the file which got created, so that is working. My HSE Speed is 8 Mhz.
Now i dont get how to mirror the System Clock onto the MCO output pin.
This is what i tried...
Can you guys help me?
I am really new to MCU Programming.
We are working with a STM32F407VG
Thanks in advance!
________________________________________________________________________________
#include "stm32f4xx.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"
#define HSE_VALUE (uint32_t)8000000
GPIO_InitTypeDef GPIO;
int main(void)
{
int i = 0;
SystemInit();
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE);
GPIO.GPIO_Mode = GPIO_Mode_AF;
GPIO.GPIO_OType = GPIO_OType_PP;
GPIO.GPIO_Speed = GPIO_Speed_50MHz;
GPIO.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO.GPIO_Pin = GPIO_Pin_9;
GPIO_Init(GPIOC, &GPIO);
//GPIO_SetBits(GPIOC, GPIO_Pin_9);
while (1)
{
i++;
}
}