Deinitializing EnetPll & external clock breaks the program

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deinitializing EnetPll & external clock breaks the program

Jump to solution
1,169 Views
OM120
Contributor I

Hi,
we are working with an imxrt1024, when we Deinitialize the EnetPll or the external 24Mhz clock(before a jump in a bootloader) the program breaks ( in a debug session) and we lose the MCU, we only recover it with switching to serial downloader mode and initializing all the peripherals.
if we don't Deinitialize them we encounter no problem and everything works fine (after the jump).
we would like to know how to properly deinitialize them and if it is necessary before a jump ?

code:

OM120_0-1698751466611.png

debug session result:

OM120_1-1698751518253.png

thanks in advance.

0 Kudos
Reply
1 Solution
1,139 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

It is not suggested to deinit clocks, is there any specific reason to deinit them? Especially the 24Mhz as it sources the important PLL as the system PLL.

Best regards,
Omar

View solution in original post

0 Kudos
Reply
3 Replies
1,130 Views
OM120
Contributor I

is there any specific reason to deinit them?

The only reason is that it has been suggested that before a jump, we should uninitialize the active perihperals in the reverse order of their initialization, but we haven't found any specific information on what to uninitialize and what not to.

0 Kudos
Reply
1,114 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

I suggest you use Config Tools, if you want to initialize a PLL to specific parameters the tool already creates the necessary code. It is not suggested to deinit all the PLLs as it might be used by one peripheral.
I think that the suggestion is to make sure that the peripherals are not clock gated so prior to being initialized they need to be clock gated. 

Best regards,
Omar

0 Kudos
Reply
1,140 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello

It is not suggested to deinit clocks, is there any specific reason to deinit them? Especially the 24Mhz as it sources the important PLL as the system PLL.

Best regards,
Omar

0 Kudos
Reply