2025-07-16 6:15 AM
Hi all
For some reason my MCO(PA8) only outputting 8MHz despite me configuring it for 60MHz
I am completely baffled because I have followed all the correct register settings(as far as I am aware) for the clock configuration, and have followed the clock diagram from the stm32cubeide
I'm working on an STM32U5G9x and its my first time working on such an advanced topic, so apologies beforehand.
Kind regards
Solved! Go to Solution.
2025-07-17 2:12 AM - edited 2025-07-17 2:13 AM
@mƎALLEm wrote:
@Maaz1 wrote:I have attached my ioc file
I've generated a project based on your ioc file and tested it and I can see 60Mhz on PA8
And the IOC file does, indeed, have MCO configured as 60MHz:
So back to @KnarfB's suggestion that the problem is with your measurement
You never did answer his question:
@KnarfB wrote:Does your LA have enough sample frequency or do you see an alias frequency?
2025-07-17 2:26 AM
My MCO is configured to PA8, and I'm using it to test my MCO
2025-07-17 2:27 AM
strangely, the code from the ioc is giivng me no results, wheras the one I wrote bare metal gives me an actual value(50MHz for now, but I can configure it!!)
2025-07-17 2:33 AM
@Maaz1 wrote:
strangely, the code from the ioc is giivng me no results,
That doesn't make sense .. did you change somthing the the ioc file ? what board are you using?
2025-07-17 2:36 AM
I'm using the stm32u5g9 j-dk2. It has an LED screen on it and is blue in colour.
2025-07-17 2:42 AM - edited 2025-07-17 2:43 AM
Are you sure you are probing MCO on Arduino connector CN6/pin 4:
2025-07-17 4:45 AM
Yeah I checked and it gave me a comfortable 60.1MHz, so eventually it worked out for me. I checked my firmware via STM32CUBEPROGRAMMER and for some reason my MCO was set to 8MHZ by default.
How would I check the multiplication and divider values on the hal file so i may try and fix my baremetal one, because it would be lighter then.
2025-07-17 4:56 AM
@Maaz1 wrote:
Yeah I checked and it gave me a comfortable 60.1MHz, so eventually it worked out for me..
If it worked for you need to accept the solution.
@Maaz1 wrote:
I checked my firmware via STM32CUBEPROGRAMMER and for some reason my MCO was set to 8MHZ by default.
Sorry I didn't understand this statement. Maybe it will be handled in a separated thread..