Letux Kernel

Issue 487: BMP085 sometimes reporting instable values

Reported by Nikolaus Schaller, Oct 14, 2013

6 BMP085 nok 949 mBar, 65 °C # Barometer values


root@gta04:~# while true; do echo $(cat 
/sys/bus/i2c/devices/2-0077/pressure0_input 
/sys/bus/i2c/devices/2-0077/temp0_input); sleep 1; done
94967 649
94961 403
94960 402
94969 402
80478 402
94963 402
80472 402
94960 402
94959 402
94960 402
77967 402
80460 402
94965 402
77320 402
77841 402
77616 402
80441 402
77926 402
77643 402
94956 402
77731 402
94957 402
77182 402
76924 402
94962 649
94961 402
94965 402
94964 402
80432 402
94967 402
^C
root@gta04:~# 

Looks like a timing issue with the EOC interrupt.

Comment 1 by Nikolaus Schaller, Oct 14, 2013

This was never observed in 2.6.32 or 3.7 kernels.

Comment 2 by Nikolaus Schaller, Nov 8, 2013

Here another sequence:


94294 393
94299 393
94293 393
94292 393
94289 393
94293 642
100710 393
94293 642
100710 642
100707 393
94296 642
100711 393
94292 393
94285 642
100701 393
94297 393
94295 393
94292 393
94291 642
100695 393
94296 393
94291 642
100690 393
94285 393
94289 393
94292 642
100693 393
94289 393
94299 642
100700 393
94290 393
94287 393
94294 393
94295 393
94290 642
100691 393
94291 393
94290 393
94297 642
100693 393
94283 393
94300 642
100697 393
94298 393
94295 393
94291 393

Comment 3 by Nikolaus Schaller, Nov 9, 2013

Fixed with commit d8c264c54d53f535c2d2071753417bbedb590511

What was the problem? The assumption that 
wait_for_completion_or_timeout guarantees a minimum timeout. Rather 
the timeout parameter specifies the number of jiffies (time ticks) 
to wait. For short delays (less than 1/HZ) this can result in no 
wait at all.

So we have to add 1 to make sure that there is a minimum delay of 
1/HZ.
Status: Fixed

Created: 10 years 6 months ago by Nikolaus Schaller

Updated: 10 years 5 months ago

Status: Fixed

Labels:
Type:Defect
Priority:Critical
Milestone:3.12