How to get LPTMR to use the LPO clock source in Processor Expert?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get LPTMR to use the LPO clock source in Processor Expert?

Jump to solution
628 Views
dominikf
Contributor II

Hei,

I have a project in CW 10.6, using Processor Expert, where a timer should wake up the MCU from STOP (LLS) mode every second. I'm using LPTMR0 as LLWU source, which works fine.

Measuring the current the MCU uses in LLS mode - 0.4 mA - I noticed that the clock source for the LPTMR is not LPO, but actually ERCLK (8 Mhz). I think that this is causing the high current consumption in LLS mode.

 

How can I get Processor Expert to use LPO as a clock source for LPTMR in order to save some power in LLS mode?

 

From this picture, the Processor Expert help text suggests that LPO is already used as source for LPTMR.

20025_20025.pngclocksettings.png

From this Timing dialog at the bottom of the screen I see that actually ERCLK with 8Mhz is used as a clock source for LPTMR.

20026_20026.pnglptmr_settings.png

Attached are the Processor Expert settings as well.

 

Do I need to use another MCG mode?

 

Any hints or suggestions are highly appreciated!

 

Best regards,

Dominik

Original Attachment has been moved to: pesettings.pef.zip

0 Kudos
1 Solution
169 Views
marek_neuzil
NXP Employee
NXP Employee

Hello Dominik,

You can select LPO clock source by using timing dialog of the Counter Frequency property of the UtcClockTimer:TimerUnit_LDD component in your project. See the screenshot below:

Please note, that the Period property just select the module value of counter.

TimerUnit_LDD - LPO selection.png

Best Regards,

Marek Neuzil

View solution in original post

0 Kudos
3 Replies
170 Views
marek_neuzil
NXP Employee
NXP Employee

Hello Dominik,

You can select LPO clock source by using timing dialog of the Counter Frequency property of the UtcClockTimer:TimerUnit_LDD component in your project. See the screenshot below:

Please note, that the Period property just select the module value of counter.

TimerUnit_LDD - LPO selection.png

Best Regards,

Marek Neuzil

View solution in original post

0 Kudos
169 Views
mjbcswitzerland
Specialist V

Dominik

I can't help with the PE setup but to use the LPO for the LPTMR you just need to select it as follows:

LPTMR0_PSR = (LPTMR_PSR_PCS_LPO | LPTMR_PSR_PBYP);

In the uTasker project this is controlled by the configuration define LPTMR_CLOCK_LPO.

As reference, you can check the links below - for the KL26 you can expect about 8mA in RUN mode (at 48MHz), 6mA in WAIT mode (full operation including USB), 1.8mA in STOP mode (full operation but possibly some peripheral response restrictions incl. USB), around 30uA in VLPS but with more peripheral response restrictions (UARTs will lose data at high Bauds).

You should get about 1..2uA in LLS with wakeup to RUN mode from LLWU pin or module (LPTMR, RTC)

and about 2uA in VLLS modes with wakeup from the same sources via reset.

Regards

Mark

Kinetis: µTasker Kinetis support (with out-of-the-box dynamic low power control)

KL26: µTasker Kinetis FRDM-KL26Z support / µTasker Kinetis Teensy LC support

LLWU: µTasker LLWU Support

For the complete "out-of-the-box" Kinetis experience and faster time to market

169 Views
dominikf
Contributor II

Hei Mark,

thanks for the helpful answer. I will try to set things manually and report back when I get to it.

0 Kudos