From 82fb23b2cc78fade702316d00510efcf9d65954f Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 28 Mar 2011 15:01:43 +0000 Subject: More changes from Uros git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3431 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/vsn/src/rtac.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'nuttx/configs/vsn/src/rtac.c') diff --git a/nuttx/configs/vsn/src/rtac.c b/nuttx/configs/vsn/src/rtac.c index b953bd851..68b94a169 100644 --- a/nuttx/configs/vsn/src/rtac.c +++ b/nuttx/configs/vsn/src/rtac.c @@ -80,3 +80,27 @@ int rtac_waitg(int group, int time) { // blocking variant of rtac_exec with timeout if specified } + + +/** Power optimization of base systick timer + * + * 1. Simple method to skip wake-ups: + * - ask timers about the min. period, which is Ns * systick + * - set the preload register with floor(Ns) * DEFAULT_PRELOAD + * - on wake-up call routines Ns times. + * + * 2. If intermediate ISR occuried then: + * - check how many periods have passed by reading the counter: Np + * - set the new counter value as (counter % DEFAULT_PRELOAD) + * - call timer routines Np times; the next call is as usual, starting + * at 1. point above + * + * This is okay if ISR's do not read timers, if they read timers then: + * - on ISR wake-up the code described under 2. must be called first + * (on wake-up from IDLE) + * + * BUT: the problem is that SYSTICK does not run in Stop mode but RTC + * only, so it might be better to replace SYSTICK with RTAC (this + * module) and do the job above, permitting ultra low power modes of + * 25 uA or further down to 5 uA. + */ -- cgit v1.2.3