I am using STM32F405 mcu and 8MHz external crystal oscillator. I want to check if my external crystal oscillator is working properly. Is it possible to check HSE clock using MCO pins (PA8/PC9)?
I have set STM32_HSECLK to 8000000. Do I need to change any other parameter?
What should be the pin configuration for MCO pins in order to do this?
--
Nikhil
Check HSE using MCO
Moderators: RoccoMarco, barthess
Re: Check HSE using MCO
Once you set MCO configuration in mcuconf.h, and set the appropriate GPIO port to Alternate function 0, you should be able to receive the system clock output on that particular pin.
Regards
Abhishek
Regards
Abhishek
Re: Check HSE using MCO
Hello,
Thanks for your answer.
Is there any option to select which clock (HSE, HSI, PLL) to recieve at MCO?
--
Nikhil
Thanks for your answer.
Is there any option to select which clock (HSE, HSI, PLL) to recieve at MCO?
--
Nikhil
Re: Check HSE using MCO
Yes, see this in mcuconf.h
You have to modify these lines.
Regards
Abhishek
Code: Select all
#define STM32_MCO1SEL STM32_MCO1SEL_HSI // Select clock source here
#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 // MCO = fClk / Prescale value
#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK
#define STM32_MCO2PRE STM32_MCO2PRE_DIV5
You have to modify these lines.
Regards
Abhishek
Who is online
Users browsing this forum: No registered users and 24 guests