Difference between revisions of "STMicroelectronics LSM303DLH"

From ArchWiki
Jump to: navigation, search
m
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category:Other hardware]]
 
{{Stub}}
 
{{Stub}}
 +
{{Expansion}}
  
The LSM303DLH is a 3-axis accelerometer and magnetometer.{{Expansion}}
+
The LSM303DLH is a 3-axis accelerometer and magnetometer.
  
 
==Driver==
 
==Driver==
  
The official driver available is available at a [http://webcache.googleusercontent.com/search?q=cache:iJTcx9sEDbUJ:www.st.com/jp/analog/product/250145.jsp+&cd=2&hl=en&ct=clnk cached version of the manufacturer's website]. The driver is open source an it was released under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (v2)]. It compiles fine, and can be loaded without problems:
+
The official driver available is available at a [http://webcache.googleusercontent.com/search?q=cache:iJTcx9sEDbUJ:www.st.com/jp/analog/product/250145.jsp+&cd=2&hl=en&ct=clnk cached version of the manufacturer's website]. The driver is open source an it was released under the [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (v2)]. It compiles fine, and the accelerometer module can be loaded without problems:
 
+
 
{{hc|dmesg|...
 
{{hc|dmesg|...
 
[  124.908804] lsm303dlh_acc_sysfs accelerometer driver: init
 
[  124.908804] lsm303dlh_acc_sysfs accelerometer driver: init
 
[  124.908876] i2c-core: driver [lsm303dlh_acc_sysfs] using legacy suspend method
 
[  124.908876] i2c-core: driver [lsm303dlh_acc_sysfs] using legacy suspend method
[  124.908885] i2c-core: driver [lsm303dlh_acc_sysfs] using legacy resume method
+
[  124.908885] i2c-core: driver [lsm303dlh_acc_sysfs] using legacy resume method}}
}}
+
The following error occurs when loading the magnetometer module:
 +
{{hc|dmesg|...
 +
[ 2546.530196] lsm303dlh_mag_sysfs: Unknown symbol input_allocate_polled_device (err 0)
 +
[ 2546.530271] lsm303dlh_mag_sysfs: Unknown symbol input_free_polled_device (err 0)
 +
[ 2546.530425] lsm303dlh_mag_sysfs: Unknown symbol input_register_polled_device (err 0)
 +
[ 2546.530550] lsm303dlh_mag_sysfs: Unknown symbol input_unregister_polled_device (err 0)}}
  
==Instantiate the device==
+
==Accelerometer==
 +
===Instantiate the device===
  
 
Run the following command to instantiate the device:
 
Run the following command to instantiate the device:
Line 26: Line 33:
 
[  833.274813] i2c i2c-2: new_device: Instantiated device lsm303dlh_acc_sysfs at 0x19}}
 
[  833.274813] i2c i2c-2: new_device: Instantiated device lsm303dlh_acc_sysfs at 0x19}}
  
==Enabling the device==
+
===Enabling the device===
  
 
{{Expansion}}
 
{{Expansion}}
  
==Reading the output of the device==
+
===Reading the output of the device===
  
 
{{Expansion}}
 
{{Expansion}}

Revision as of 15:54, 13 June 2012

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:STMicroelectronics LSM303DLH#)

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:STMicroelectronics LSM303DLH#)

The LSM303DLH is a 3-axis accelerometer and magnetometer.

Driver

The official driver available is available at a cached version of the manufacturer's website. The driver is open source an it was released under the GNU General Public License (v2). It compiles fine, and the accelerometer module can be loaded without problems:

dmesg
...
[  124.908804] lsm303dlh_acc_sysfs accelerometer driver: init
[  124.908876] i2c-core: driver [lsm303dlh_acc_sysfs] using legacy suspend method
[  124.908885] i2c-core: driver [lsm303dlh_acc_sysfs] using legacy resume method

The following error occurs when loading the magnetometer module:

dmesg
...
[ 2546.530196] lsm303dlh_mag_sysfs: Unknown symbol input_allocate_polled_device (err 0)
[ 2546.530271] lsm303dlh_mag_sysfs: Unknown symbol input_free_polled_device (err 0)
[ 2546.530425] lsm303dlh_mag_sysfs: Unknown symbol input_register_polled_device (err 0)
[ 2546.530550] lsm303dlh_mag_sysfs: Unknown symbol input_unregister_polled_device (err 0)

Accelerometer

Instantiate the device

Run the following command to instantiate the device:

# echo lsm303dlh_acc_sysfs 25 > /sys/bus/i2c/devices/i2c-2/new_device

Although, it seems to be a problem with the driver.

demesg
...
[  833.274769] lsm303dlh_acc_sysfs: probe start.
[  833.274781] lsm303dlh_acc_sysfs 2-0019: platform data is NULL. exiting.
[  833.274790] lsm303dlh_acc_sysfs: Driver Init failed
[  833.274813] i2c i2c-2: new_device: Instantiated device lsm303dlh_acc_sysfs at 0x19

Enabling the device

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:STMicroelectronics LSM303DLH#)

Reading the output of the device

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:STMicroelectronics LSM303DLH#)

See also