cancel
Showing results for 
Search instead for 
Did you mean: 

H733: MCO output active without GPIO init

LCE
Principal

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).

13 REPLIES 13

> 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

LCE
Principal

Hmm, I can only read RCC_CFGR = 0, GPIO clock is not even enabled...

> 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

 

LCE
Principal

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! :frowning_face: