Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4650 Datasheet(PDF) 64 Page - STMicroelectronics

Part # AN4650
Description  This document is intended to provide usage information
PDF  102 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4650 Datasheet(HTML) 64 Page - STMicroelectronics

Back Button AN4650 Datasheet HTML 60Page - STMicroelectronics AN4650 Datasheet HTML 61Page - STMicroelectronics AN4650 Datasheet HTML 62Page - STMicroelectronics AN4650 Datasheet HTML 63Page - STMicroelectronics AN4650 Datasheet HTML 64Page - STMicroelectronics AN4650 Datasheet HTML 65Page - STMicroelectronics AN4650 Datasheet HTML 66Page - STMicroelectronics AN4650 Datasheet HTML 67Page - STMicroelectronics AN4650 Datasheet HTML 68Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 64 / 102 page
background image
Mode 2 - sensor hub mode
AN4650
64/102
DocID027415 Rev 1
6.3
Sensor hub mode example
The configuration of the external sensors should be performed using the pass-through
feature: this feature can be enabled by setting the PASS_THROUGH_MODE bit of the
MASTER_CONFIG register to 1 and implements a direct access to the external sensor
registers, allowing quick configuration.
The code provided below gives a basic routine to configure the LSM6DS3 in sensor hub
mode. Furthermore, this sequence configures the LIS3MDL external magnetometer sensor
(refer to the datasheet for additional details) in continuous-conversion mode and reads the
magnetometer output registers, saving their values in the SENSORHUB1_REG to
SENSORHUB6_REG registers. The pass-through feature is not used in this example.
1
Write 80h into FUNC_CFG_ADDRESS
// Enable access to embedded functions registers
2
Write 38h into SLV0_ADD
// LIS3MDL slave address = 0011100b (if SDO=0)
// Enable write operation (rw_0=0)
3
Write 22h into SLV0_SUBADD
// 22h is the LIS3MDL register to be written
4
Write 00h into
DATAWRITE_SRC_MODE_SUB_SLV0
// 00h is the value to be written in register 22h of
// LIS3MDL to configure it in continuous
// conversion mode
5
Write 00h into FUNC_CFG_ADDRESS
// Disable access to embedded functions registers
6
Write 3Ch into CTRL10_C
// Enable embedded functions
7
Write 09h into MASTER_CONFIG
// Enable internal pull-up on SDx/SCx lines
// Sensor hub trigger signal is XL Data Ready
// Enable auxiliary I2C master
8
Write 80h into CTRL1_XL
// Turn-on the accelerometer (for trigger signal)
9
Write 38h into CTRL10_C
// Disable embedded functions
10 Write 00h into MASTER_CONFIG
// Disable auxiliary I2C master
11 Write 00h into CTRL1_XL
// Turn-off the accelerometer
12 Write 80h into FUNC_CFG_ADDRESS
// Enable access to embedded functions registers
13 Write 39h into SLV0_ADD
// LIS3MDL slave address = 0011100b (if SDO=0)
// Enable read operation (rw_0=1)
14 Write 28h into SLV0_SUBADD
// 28h is the first LIS3MDL output register to be
// read
15 Write 06h into SLAVE0_CONFIG
// No decimation
// 1 external sensor connected
// Number of registers to read = 6
16 Write 00h into FUNC_CFG_ADDRESS
// Disable access to embedded functions registers
17 Write 3Ch into CTRL10_C
// Enable embedded functions
18 Write 09h into MASTER_CONFIG
// Enable internal pull-up on SDx/SCx lines
// Sensor hub trigger signal is XL Data Ready
// Enable auxiliary I2C master
19 Write 80h into CTRL1_XL
// Turn on the accelerometer (for trigger signal)



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com