LPO32K_CLK as watchdog clock

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

LPO32K_CLK as watchdog clock

跳至解决方案
1,738 次查看
adrianwenger
Contributor III

Hi,

i want to set the LPO32K_CLOCK as wdog clock source

Settings:

Unbenannt.PNG

PMC->REGSC = PMC_REGSC_LPODIS(0);    /* 0b - Low power oscillator enabled */

SIM->LPOCLKS = SIM_LPOCLKS_LPOCLKSEL(2);    /* LPO32K_CLK Source */

 WDOG->CS = WDOG_CS_CLK(1)    /* Watchdog Clock --> 1b - LPO Clock */

 

Unbenannt1.PNG

This seetings shout normaly enable the 32 KHz LPO clock, but if i measure it, it seems to use still the 128 KHz LPO...

regards,

Adrian

 

标签 (1)
1 解答
1,347 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

 

I use a very simple code to set up the clock for the watchdog.

What is the exact problem? Are you able to set LPOCLKSEL bits?

If not, download the application to the MCU and then unplug power supply.

Connect it again and the register should be set.

Regards,

Daniel

在原帖中查看解决方案

0 项奖励
5 回复数
1,348 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

 

I use a very simple code to set up the clock for the watchdog.

What is the exact problem? Are you able to set LPOCLKSEL bits?

If not, download the application to the MCU and then unplug power supply.

Connect it again and the register should be set.

Regards,

Daniel

0 项奖励
1,347 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

The LPOCLKS register is a write-once register, and is reset only on POR or LVD.

So have tried writing to the register after POR?

Regards,

Daniel

0 项奖励
1,347 次查看
adrianwenger
Contributor III

Hi ,

yes I immediatly set up the Watchdog After reset. 

Regards,

Adrian

0 项奖励
1,347 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

So, it doesn’t work even if you write to the LPOCLKS register after power-on-reset, when you unplugged the power supply. Has the content of the register changed? I have tried it and it works.

Regards,

Daniel

0 项奖励
1,347 次查看
adrianwenger
Contributor III

Yes I setup the registers at the beginning of the Main Loop. Can you maybe post your example in here?

Thanks 

0 项奖励