AnsweredAssumed Answered

For STM32F407 how to set PLL as the source of SYSCLK and to see it on pin MCO1 o

Question asked by kashuba.dmitry on Nov 16, 2016
Latest reply on Nov 16, 2016 by Clive One
Hi! I wrote program for STM32F407, where I set PLL as the source of SYSCLK and want to see it on pin MCO1.
The program is:
#include "stm32f4xx.h"

uint32_t i, temp;
int main()
{
//config clock
RCC->CR=RCC_CR_HSION;
while (!(RCC->CR&RCC_CR_HSIRDY));
RCC->APB1ENR=RCC_APB1ENR_PWREN;     
PWR->CR|=     PWR_CR_VOS;     
RCC->PLLCFGR=RCC_PLLCFGR_PLLSRC_HSI;
RCC->PLLCFGR|=0x00000F08;//n=60, m=8, hs=8 MHz, p=2
RCC->CR|=RCC_CR_PLLON;
while (!(RCC->CR&RCC_CR_PLLRDY));
FLASH->ACR|=FLASH_ACR_LATENCY_5WS;
RCC->CFGR|=     (RCC_CFGR_PPRE2_DIV2|RCC_CFGR_PPRE1_DIV4);
RCC->CFGR|=     RCC_CFGR_SW_PLL;     

//enable gpio, usart6, mac
RCC->AHB1ENR=RCC_AHB1ENR_GPIOAEN;//vkl takt port

//config type GPIO
GPIOA->MODER|=GPIO_MODER_MODER8_1;
//GPIOA->OSPEEDR=GPIO_OSPEEDER_OSPEEDR8;

RCC->CFGR|=RCC_CFGR_MCO1;
while (1);
}

Impulses on MCO1 are wrong!
What must I do to solve the problem?
 
Thank You!

Outcomes