Deinitializing EnetPll & external clock breaks the program

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Deinitializing EnetPll & external clock breaks the program

跳至解决方案
2,008 次查看
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 项奖励
回复
1 解答
1,978 次查看
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 项奖励
回复
3 回复数
1,969 次查看
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 项奖励
回复
1,953 次查看
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 项奖励
回复
1,979 次查看
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 项奖励
回复