cancel
Showing results for 
Search instead for 
Did you mean: 

Zephyr application gets stuck after enabling MCO1 on stm32n657X0

romanx
Associate II

I'm using zephyr sysbuild approach to get mcuboot along with the application (application runs in XIP mode)
I see that application proceeds to some point; I presume to the point where I enable MCO 

LL_RCC_EnableMCO(LL_RCC_MCO1)

And then it gets stuck, since I'm not able to attach gdb yet, I'm not sure where to dig
Kindly appreciate any help here
Seems that it interferes with other clock subsystems, but don't know which
I haven't found anything in errata yet
Please advise, thank you

EDIT: Although I'm able to see MCO pin (PA8) toggling with the desired frequency, which means SEL and PRE DIV were ok 

2 REPLIES 2
Mageee
Associate II

Enabling MCO1 can affect other clock domains. Check for conflicts with system clocks or PLL settings. Verify bus clocks and peripheral dependencies; using a debugger or toggling step-by-step may help isolate the hang.

 

 

That makes so much sense, thank you !
Some thought here :
* Since even debugger gets lost, I presume some "major" clock gets affected , like core or so
* if MCO keeps toggling, that means rcc is fine to some extent
* I haven't seen anything like this on previous stm32 families
* if MCO hurts clocking system that bad, there might be no way to workaround it ?
* I presume MCO path must be very straightforward, like just a couple of dividers and mux, should not affect others..
So, maybe enabling it, somehow affects power domain ? say core voltage drops below certain value and core dies..
Like it drains some extra power..
* In a bare minimum template project in cube ide, with no peripheral enabled, everything works just fine

Will keep digging ...