2007-09-30 2:10 PM
How can i use PA8 as MCO?
2011-05-17 3:16 AM
Dear wuguobing,
You can configure PA8 to MCO by simply calling these functions : /* Configure GPIOA ------------------------------------------*/ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA , ENABLE); /* Output HSE clock on MCO pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init(GPIOA, &GPIO_InitStructure); RCC_MCOConfig(RCC_MCO_HSE); You can refer to the STM32 Firmware library using this link :http://www.st.com/stonline/products/support/micro/files/um0427.zip
Then you can go to the RCC Example in this directory ''STM32F10xFWLib/FWLib/examples/RCC'' where you will find more details ;) With best regards, STOne-322011-05-17 3:16 AM
PA8 is a multi-function pin, it's AF can be USART1_CK, TIM1_CH1 or MCO, how can i config it to be MCO?
I can remap TIM1 to none, but USART1_CK can't be remapped!2011-05-17 3:16 AM
Thanks a lot!
After reset, USART1_CK, TIM1_CH1 and MCO are disabled, to use PA8 as mco, just config MCO to work, and config PA8 to AF mode.:-D Only one AF on the same pin can be enabled. But if two AF functions in output mode is enabled at same time, what would happen, stm32 will be destroyed?We’re moving the ST Community to a new platform to give you a better and more reliable community experience.