AnsweredAssumed Answered

Put HSE on MCO1

Question asked by jdcowpland on Dec 19, 2013
Latest reply on Jan 6, 2014 by Clive One
I have this code that is trying to put my HSE clock onto MCO1 (A8) on my STM32F407 Discovery, but it doesn't work. Anyone know what's wrong?

#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"
int main(void)
{
 
 
 GPIO_InitTypeDef GPIO_InitStructure;
 
  /* Enable GPIOs clocks */
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
GPIO_PinAFConfig(GPIOA, GPIO_PinSource8, GPIO_AF_MCO);
   /* Configure MCO (PA8) */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
 
RCC_MCO1Config(RCC_MCO1Source_HSE, RCC_MCO1Div_1);
 
 
}

Outcomes