2024-07-03 06:58 AM
Heyho,
so I was just checking the MCO1 output of my STM32H733ZGT6 and found some super jittery 64 MHz with full swing between 0V and 3.3V.
Then checked my code and found that I had not set the RCC->CFGR and not even initialized the GPIO.
When I actually set it up it does what it should, but why is there such an output signal without the GPIO having been configured?
This could be some serious EMI source or cause some other trouble if the GPIO is not yet configured, but connected elsewhere (I only have a serial R and a testpoint on my PCB).
Solved! Go to Solution.
2024-07-09 05:46 AM - edited 2024-07-09 05:46 AM
> It doesn't actually matter how the registers are configured, at least I haven't found some "MCO off" bit, there's only the source selection (default HSI = 64MHz) and divider settings (1 = default).
Just read them out (both RCC_CFGR and GPIO registers) and post.
JW
2024-07-09 06:23 AM
Hmm, I can only read RCC_CFGR = 0, GPIO clock is not even enabled...
2024-07-09 06:53 AM
> GPIO clock is not even enabled...
And if you enable it, what are the GPIO registers' values?
---
Yes, I do have a suspicion, that this is consequence of a bootloader, either default or your own. Either one might have set various registers and then incompletely restored them.
JW
2024-07-09 09:54 AM
I was just about to check the GPIO, when I found one of the most embarrassing mistakes I made (here):
The bootloader (which is active for only a few ms) had the MCO configured. Ouch.
Sorry that I have wasted your time! ☹️