Вт июн 24, 2014 11:40:44
Вт июн 24, 2014 11:52:11
Вт июн 24, 2014 11:57:55
Вт июн 24, 2014 12:01:58
Вт июн 24, 2014 12:22:00
Вт июн 24, 2014 13:12:18
/**
* Cortex M0 - STM32F0 Discovery board code spew out one of the clocks on PA.8
*/
void OutputMCO() {
GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
/* Output clock on MCO pin ----------*/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);
// pick one of the clocks to spew
RCC_MCOConfig(RCC_MCOSource_SYSCLK); // Put on MCO pin the: System clock selected
//RCC_MCOConfig(RCC_MCOSource_HSE); // Put on MCO pin the: freq. of external crystal
//RCC_MCOConfig(RCC_MCOSource_PLLCLK_Div2); // Put on MCO pin the: System clock selected
}