Sensor data acquisition and keeping the CPU awake

Hi all,

I've recently observed some really strange behavior on a Samsung Gear S3 device running Tizen I've written both a native service app an web app targetting Tizen 3.0 for wearables but don't see any difference. During launch of these apps, I've used corresponding calls to keep the CPU awake to prevent the sensor acquisition to go to sleep which I had previously experienced. I log the samples in a file stored on the device's local storage (in /opt/usr/media/). 

Now the strange thing is, when I force the CPU to stay awake, the log file contains twice as many sensor samples.

To clarify, if I'm logging the acceleromter signal I'm getting: Acc1 - Acc1 - Acc2 - Acc2 -  .... - AccN - AccN instead of just Acc1 - Acc2 - Acc3, etc. which I observe when not forcing the CPU to stay awake. So somehow forcing the CPU to stay awake is pushing the system to simply repeat every sample. Even the event time-stamps are the same for every pair of identical samples!!

Has anyone observed this behavior before? Is it a known Tizen bug?

Thanks in advance for your input/comments,

View Selected Answer


3 Replies
Yasin Ali


Could you please share your recorded data with timestamp
while keeping the cpu awake.

Sam Richardson

Hi Yasin,

Here's a snippet of the data:



The rest of the file is the same, constant repetition.

First two columns are the event time-stamp and clock_monotonous values, followed by the 3D accelerometer x,y,z values.  I also reset the watch because I was worried it had to do with some uncancelled alarms but with no luck. When I comment out the C-statements (which are in service_app_create and _terminate) that lock and release the CPU awake then this problem resolves but sensor logging drops after some time which is counter to what I want. I also have the necessary privildges like display and healthinfo enabled. Also, the background category is set to sensor.  So not sure what's going on..

Kind regards,


Mark as answer
Yasin Ali

Check Tizen native service application life-cycle(service application states).
Match your code and log accordingly.