Openmoko Bug #2145: Debian: Reading of accelerometers broken

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------
 Running Debian with Kernel 2.6.24-20081103.git7172ec57-1 I have the
 following problem reading the accelerometers.

 -when the device is lying still /dev/input/event2 and 3 is producing
 output
 -as soon as the is moved event2 & 3 are no longer producing any output.
 -when the device is lying still again the device is producing output
 again.

 I tested it with a simple
 hexdump /dev/input/event2

 Some people on #openmoko-debian were able to reproduce this bug.

 This problem doesn't occur running the Om2008.9 kernel.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------
Changes (by andy):

 * cc: simon.kagstrom@… (added)


Comment:

 It sounds a great deal like the wrong "polarity" of threshold interrupt is
 being selected, ie, interrupt when it's LESS than the threshold rather
 than more.  lis302dl supports both "polarities".

 cc-ing Simon Kagstrom since he wrote the threshold stuff.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:1>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------

Comment(by SimonKagstrom):

 I checked the source code and it looks correct. In
 __enable_data_collection, we do this when enabling the data collection
 with a threshold:

           __reg_write(lis, LIS302DL_REG_FF_WU_CFG_1,
                            LIS302DL_FFWUCFG_XHIE | LIS302DL_FFWUCFG_YHIE |
                            LIS302DL_FFWUCFG_ZHIE);

 So it should be "high" events. I also tested on my freerunner on stable-
 tracking, and for me it appears to work fine (although it's input devices
 3 and 4 here). It's quiet when flat on the table, but as I pick it up,
 data starts flowing.

 I set the threshold to 100.

 // Simon

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:2>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------

Comment(by andy):

 Thanks for looking at it Simon, I guess a big difference is that Debian is
 still on some variant of stable branch.

 Defiant, have a try of the same thing with the kernel you can find in
 http://people.openmoko.org/andy the one with andy-tracking in the name,
 see if it changes the behaviour.  These are from today and quite similar
 to what Simon is testing with.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:3>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------

Comment(by Defiant):

 I tried the kernel from the 18th November and it looks it fixes the
 problem.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:4>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------

Comment(by andy):

 We can close this bug then?

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:5>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
----------------------+-----------------------------------------------------
 Reporter:  Defiant   |          Owner:  hardware            
     Type:  defect    |         Status:  new                
 Priority:  normal    |      Milestone:                      
Component:  hardware  |        Version:  unspecified        
 Severity:  normal    |       Keywords:  debian event2 event3
 Haspatch:  0         |      Blockedby:                      
Estimated:            |    Patchreview:                      
 Blocking:            |   Reproducible:  always              
----------------------+-----------------------------------------------------

Comment(by Defiant):

 Yes - thanks.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:6>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------
Changes (by andy):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Great, thanks for the report and the resoluton.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:7>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by chgros):

 2008.12 appears to be affected by that bug.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:8>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by DigitalPioneer):

 I've got this in latest SHR (image uploaded to server on Dec 14 2008).

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:9>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by SimonKagstrom):

 Personally I think it would be good if the distributions would move to
 andy-tracking, or at least start preparing for it. Apparently it fixes
 this issue. (Although I honestly cannot see what should be wrong in the
 2.6.24 branch of the accelerometer code).

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:10>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by Yorick):

 I have the same problem in SHR

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:11>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by andy):

 Simon is there are sysfs we can get people to dump in order to see the
 interrupt source register state directly?  If there isn't maybe you can
 just knock up a quick debug patch and I will apply it to the 2.6.24 tree.

 In the meanwhile if somebody with the problem can try an andy-tracking
 kernel from http://people.openmoko.org/andy and confirm it's OK there that
 can give us a way forward too.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:12>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by Johannes):

 uImage-moredrivers-GTA02_andy-tracking_e142549d884a17b8.bin
 18-Dec-2008 20:22  2.4M

 has the problem, so using ...andy-tracking is NOT the solution per se.

 Is there another kernel from 18th November as mentioned by Defiant? I
 would try that too, if it were available.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:13>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by Johannes):

 Not sure if this helps:

 printing interrupt counts for lis302dl from /proc/interrupts does not
 change with movement of device but with reading from /dev/input/event3.

 Running the script below it does not matter if the device is laying on the
 table or shaken like hell during the 10s pause, interrupt counts are
 increasing at the same slow rate of 2 counts per 10s.

 debian-gta02:~# while [ 1 == 1 ] ; do dd if=/dev/input/event3 bs=16
 count=6 > /dev/null ; cat /proc/interrupts |grep lis302dl ; sleep 10 ;
 done
 6+0 records in
 6+0 records out
 96 bytes (96 B) copied, 0.030005 s, 3.2 kB/s
  16:        521    s3c-ext0  lis302dl
  60:      19262     s3c-ext  lis302dl
 6+0 records in
 6+0 records out
 96 bytes (96 B) copied, 0.036205 s, 2.7 kB/s
  16:        521    s3c-ext0  lis302dl
  60:      19264     s3c-ext  lis302dl
 6+0 records in
 6+0 records out
 96 bytes (96 B) copied, 0.029541 s, 3.2 kB/s
  16:        521    s3c-ext0  lis302dl
  60:      19266     s3c-ext  lis302dl

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:14>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by DigitalPioneer):

 Using andy-tracking: uImage-moredrivers-GTA02_andy-
 tracking_e142549d884a17b8.bin
 Getting a steady hexdump from both accelerometers regardless of whether
 the phone is moving or not. :)

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:15>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by SimonKagstrom):

 There is a dump sysfs entry, that should give all registers of the device.
 I had a debug patch a while which offered more fine-granular access to the
 registers, but I don't think that's really needed in this case. It could,
 as always, be good to check the values of threshold etc.


 I don't think there is any changes to the accelerometer code the last
 couple of weeks, so it's strange if it suddenly broke now. However, is
 this really the same issue? The original bug report suggest that the
 device produces values in the opposite way than it's supposed to -
 producing data while being still and not when being shaken.

 The new reports seem to be a general low amount of traffic. Do the
 ruby/python scripts on

    http://wiki.openmoko.org/wiki/Accelerometer_data_retrieval

 seem to output reasonable data at least?

 // Simon

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:16>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by DigitalPioneer):

 For me, I only got data when the phone was still, from hexdump or they
 perl script on that page.

 The andy-tracking kernel fixed the issue, but when I rotated the screen,
 it screwed something up and display went white with lines of yellow, gray,
 black.. across it. Not even x restart fixed it, had to reboot. I changed
 kernels again.

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:17>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by Johannes):

 Running the ruby script from Accelerometer_data_retrieval produces this
 output (device is not moved, laying on the table).

 {{{
    90   -36   954   958
    90   -36   972   976
    90   -36   954   958
    90   -36   954   958
    90   -36   954   958
    90   -36   954   958
    90   -36   972   976
 }}}

 Interrupt counts measured at the same time is giving this.

 {{{
 debian-gta02:~# while [ 1 == 1 ] ; do cat /proc/interrupts |grep lis302dl
 ; sleep 10 ; done
  16:        521    s3c-ext0  lis302dl
  60:      38414     s3c-ext  lis302dl
  16:        521    s3c-ext0  lis302dl
  60:      39456     s3c-ext  lis302dl
  16:        521    s3c-ext0  lis302dl
  60:      40503     s3c-ext  lis302dl
 }}}

 So constanly reading from /dev/input/event3 produces approx. 100
 interrupts per 1s.

 Also I modified the ruby script to select before reading, this does not
 change the behaviour at all. Again this looks like reading from
 /dev/input/event3 is triggering the interrupt.

 {{{
 ...
 File.open("/dev/input/event3") do |f|
   while true
     select([f],nil,nil,nil)
     event = f.read(16).unpack("llSSl")
 ...
 }}}

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:18>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
Reply | Threaded
Open this post in threaded view
|

Re: Openmoko Bug #2145: Debian: Reading of accelerometers broken

Openmoko Public Trac
In reply to this post by Openmoko Public Trac
#2145: Debian: Reading of accelerometers broken
-------------------------------------+--------------------------------------
    Reporter:  Defiant               |        Owner:  hardware  
        Type:  defect                |       Status:  closed    
    Priority:  normal                |    Milestone:            
   Component:  hardware              |      Version:  unspecified
    Severity:  normal                |   Resolution:  fixed      
    Keywords:  debian event2 event3  |     Haspatch:  0          
   Blockedby:                        |    Estimated:            
 Patchreview:                        |     Blocking:            
Reproducible:  always                |  
-------------------------------------+--------------------------------------

Comment(by SimonKagstrom):

 A general comment first: Thanks to all for the testing and experiments,
 the messages here have been very clear and to the point!


 Johannes: 100 interrupts per second sounds right when the threshold is 0
 (so that new datums is signalled by the interrupt) - the data rate is set
 to 100Hz by default. With threshold 0, the interrupt rate should not
 change depending on if the device is shaken or not - it always interrupts
 at each datum in that case.

 As for your earlier test: The interrupt is only enabled when the device
 file is opened - so if I understand that test correct, you are closing the
 device during the sleep and in that case the interrupt stream should stop.

 DigitalPioneer: Your first problem certainly sounds like the original
 issue, but as for the screen corruption I have no idea :-). To me it
 sounds like a more general problem. Andy: Could it have something to do
 with the "manual" bitbang used by the accelerometer code? (I'm thinking if
 it can somehow interfer with the Glamo).

--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2145#comment:19>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
_______________________________________________
hardware mailing list
[hidden email]
http://lists.openmoko.org/mailman/listinfo/hardware
12