LPO32K_CLK as watchdog clock

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

LPO32K_CLK as watchdog clock

Jump to solution
2,271 Views
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

 

Labels (1)
1 Solution
1,880 Views
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

View solution in original post

0 Kudos
Reply
5 Replies
1,881 Views
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 Kudos
Reply
1,880 Views
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 Kudos
Reply
1,880 Views
adrianwenger
Contributor III

Hi ,

yes I immediatly set up the Watchdog After reset. 

Regards,

Adrian

0 Kudos
Reply
1,880 Views
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 Kudos
Reply
1,880 Views
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 Kudos
Reply