Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Adjusting for lost ticks during suspend: (4 Items)
   
Adjusting for lost ticks during suspend  
I am trying to understand how QNX compensates for ticks lost during suspend.

The below is the scenario I am worried about:

1. Process requests for a wake up in 2 minutes
2. With no active jobs to do, QNX puts the system into stand by, shutting down timer interrupts
3. User presses power key after a minute
4. In order to not wake up the process from #1 too early, its timer has to be adjusted. 

I was thinking there has to be some callout a BSP has to provide for QNX to figure out how much time was spent without 
any timer interrupt. I have not been able to figure this out from the documentation, however

Could someone please help here?
Re: Adjusting for lost ticks during suspend  
Hi, have You read this first?
http://www.qnx.com/developers/docs/6.3.0SP3/power_mgmt_en/user_guide/cpu_mem.html

I suppose if You are working on a supported hardware You can use the pm_xxxx API to
suspend/resume : check Your bps for that.
If Your Hw do not have pm implemented and You have the bsp sources, maybe You have
to write it or a part of it by Yourself :-) 
On AM335x TI CPU for instance one timer can be clocked by a 32KHz qz that is always 
running, so system do not lost ticks if it uses that one (in Linux works fine- maybe also in qnx)...
I do not know if this is possible also in your hw: maybe it has a RTC used to restore the 
system timer value when CPU resumes...
regards,
Mario
Re: Adjusting for lost ticks during suspend  
Hi mario

Thank you very much for the pointer

may I ask if you happen to know if QNX 6.6 deprecated the power support?

http://www.qnx.com/developers/docs/660/topic/com.qnx.doc.neutrino.lib_ref/topic/lib-s.html

It seems sysmgr_cpumode is not documented there
Re: Adjusting for lost ticks during suspend  
Power management changed in QNX SDP 6.6, and sysmgr_cpumode() is now obsolete. There are a couple of short sections on 
power management in the QNX Neutrino Programmer's Guide:

http://www.qnx.com/developers/docs/am11/topic/com.qnx.doc.neutrino.prog/topic/timing_Power_management.html?cp=1_3_1_4_4

http://www.qnx.com/developers/docs/am11/topic/com.qnx.doc.neutrino.prog/topic/inthandler_Power_management.html?cp=
1_3_1_6_5_4

We intentionally left the details undocumented, because they could change again.