This snippet application interfaces the FXOS8700 accelerometer and magnetometer sensors to Wiced SDK using I2C interface.

 

Features demonstrated

     - I2C device setup and connection using WICED

     - I2C device data send and receive using WICED

     - Interface to I2C sensor device

Snipped application:

     - Sets up the I2C interface to the device and communicates to read and write sensor registers.

     - Sets up the interrupts using WICED GPIO interrupt handling function.

     - Calibrates the accelerometer and magnetometer sensors in the FXOS8700.

     - On each interrupt from the FXOS8700, the sensor data is read and printed on the serial terminal.

 

Connection setup for I2C device to STM32F4xx based WICED evaluation board

 

FRDM-STBC-AGM01      BCM943341WCD1 J7 Header

   J3-1 +                                       J7-28

   J4-5 -                                        J7-27

   J3-5 SDA                                  J7-26

   J3-4 SCL                                  J7-25

   J4-1 INT1_8700                       J7-8

   J4-8 INT1_21002                     J7-7

 

NOTE: On BCM943341WCD1, SDA and SCL signals already have a 4.7K pull up resistors.

 

Connect a PC terminal to the serial port of the WICED Eval board, then build and download the application as described in the WICED Quick Start Guide.

Either apply the attached patch or copy the attached files to ../apps/snip directory.

Application could be built using following Make Target command for BCM943341WCD1 platform:

     snip.i2c_fxo-BCM943341WCD1 download run

     snip.i2c_fxo-BCM943341WCD1-debug download run

 

Here is the BCM943341WCD1 EVB with FRDM-STBC-AGM01 EVB:

 

Here is the serial terminal output:

 

.