cancel
Showing results for 
Search instead for 
Did you mean: 

how to allow the clock to be output onto the external MCO pin

yasamin
Associate II
Posted on May 06, 2015 at 13:03

I want to have a sample of system clock at MCO pin of STM32F107RC micro controller.

I use dspin firmware library for driving stepper motor.

The on board crystal is 8MHz and system clock set to be 72MHz.

I add this code to ''dspin.c'':

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;

  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;

  GPIO_Init(GPIOA, &GPIO_InitStructure);

and I add the below line code in ''SetSysClockTo72()'' function at ''system_stm32f10x.c'' file.

RCC->CFGR &= (uint32_t)0xF6FFFFFF;   //HSE clock selected as MCO source

But I don't have no clock output on this pin.

please guide me

thanks

yasamin
10 REPLIES 10
Amel NASRI
ST Employee
Posted on May 15, 2015 at 12:20

Hi Clive,

Thanks for your explanation.

Yes it is possible to remove post.

But as a general rule that we may apply here: keep only one topic on once discussion.

This way, it will be easier for other users to find a help and then for contributors to follow the discussion.

Don't you agree?

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.