Hi,
i want to set the LPO32K_CLOCK as wdog clock source
Settings:
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 */
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
Solved! Go to Solution.
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
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
Hi ,
yes I immediatly set up the Watchdog After reset.
Regards,
Adrian
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
Yes I setup the registers at the beginning of the Main Loop. Can you maybe post your example in here?
Thanks