2017-11-01 01:33 AM
Hi,
I am migrating from stm32f103 to stm32f205.
stm32f103 allows switching MCO on by HAL_RCC_MCOConfig(RCC_MCO, RCC_MCO1SOURCE_HSE, RCC_MCODIV_1) and off MCO by HAL_RCC_MCOConfig(RCC_MCO, RCC_MCO1SOURCE_NOCLOCK, RCC_MCODIV_1).
However stm32f205 doesn't support RCC_MCO1SOURCE_NOCLOCK.
Is there a way to switch stm32f205 MCO on/off?
Thanks for assistance.
Boris.
#stm32f2-mco-switching-off2017-11-01 04:20 AM
Hello,
The MCO1 pin is configured in alternate function mode, mapped in PA8.
To disable it, you can
configure the pin in
input floating mode (reset state).Best Regards
Imen
2017-11-01 05:56 AM
,
,
Hi Imen,
Thank you for attention to the problem.
As I understand the possible solution is:
void SetMCO( uint32_t mode) {
, , , GPIO_InitTypeDef GPIO_InitStruct,
, , , GPIO_InitStruct.Pin = GPIO_PIN_8,
, , , GPIO_InitStruct.Mode = mode,
, , , GPIO_InitStruct.Pull = GPIO_NOPULL,
, , , GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW,
, , , GPIO_InitStruct.Alternate = GPIO_AF0_MCO,
, , , HAL_GPIO_Init(GPIOA, &,GPIO_InitStruct),
}
void MCO_On() {
, , , SetMCO( GPIO_MODE_AF_PP),
}
void MCO_Off() {
, , , SetMCO( GPIO_MODE_INPUT),
}
Is it right?
Regards, Boris.
01.11.2017 14:21, Imen D �?¿�?¸Ñˆ�?µÑ‚:
>,
STMicroelectronics Community
<,https://community.st.com/?et=watches.email.thread>,
>,
Re: stm32f2 MCO switching off
reply from Imen D
<,https://community.st.com/people/DAHMEN.IMEN?et=watches.email.thread>,
in /STM32 MCUs Forum/ - View the full discussion
<,https://community.st.com/message/173769-re-stm32f2-mco-switching-off?commentID=173769&,et=watches.email.thread ♯ comment-173769>,
>,