Oh I just fixed the problem already.
Just looking at the CircleOS code with the datasheet of the MEMS sensor.
Why setting the data rate at 2560 Hz? 40 Hz will be just fine.
so just change the setting in mems.c to 40 Hz and voila..
find the next lines in Mems.c of circleOS
/* SET P0:P1 to '11' */
/* 0xC0 to wake up and 0x30 for full speed frequency (640 Hz). */ <-- this is 2560 Hz btw
reg_val = reg_val | 0xC0 | 0x30;
change it to:
reg_val = 0xC7; /* data rate 40 Hz X,Y,Z Enabled */
Make your application with the new build fat.elf and circle.elf
...now you have got very stable data
you can add MEMS_SetNeutral(); to that code to perfectly set your offset.
then you'll have at normal position 0,0,0 as data.
At the startup of CircleOS, after poweroff your neutral position will be set.
Regards w0utje