element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog Interfacing Freescale’s FRDM-STBC-AGM01 sensor module to FRDM-KL46Z using Kinetis Design Studio 3.0 Kinetis SDK 1.2 Processor-Expert
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 16 Sep 2015 6:54 AM Date Created
  • Views 916 views
  • Likes 0 likes
  • Comments 2 comments
  • fxos8700c
  • frdm-stbc-agm01
  • frdm-kl46z
  • fxas21002c
Related
Recommended

Interfacing Freescale’s FRDM-STBC-AGM01 sensor module to FRDM-KL46Z using Kinetis Design Studio 3.0 Kinetis SDK 1.2 Processor-Expert

bheemarao
bheemarao
16 Sep 2015

This is a project for interfacing FRDM-STBC-AGM01 sensor module to FRDM-KL46Z using Kinetis Design Studio 3.0 Kinetis SDK 1.2 Processor-Expert. This board is 9-axis Sensor Toolbox Development Board Enabled for sensor fusion with FXAS21002C 3-axis gyroscope and FXOS8700C 6-axis integrated e-compass, as part of the Freescale Freedom development platform.


This project has 4 state machines:


1)  Default mode: this will prompt the user to press the push button

2)  Accelerometer mode: when button is pressed once from its earlier state, it enters into accelerometer mode of working where the sensor FXOS8700CQ is active and displays 3 axis 14-bit accelerometer value.

3)  Magnetometer mode: when button is pressed from its earlier state, it enters into this mode where the sensor FXOS8700CQ starts to work and 16-bit 3-axis magnetometer data is displayed on terminal.

4)  Gyrometer mode: we need to press the push button as did earlier to enter into this mode. In this mode the sensor FXAS21002C is active and it displays 3-axis 16-bit gyro data on the terminal.

5)  Temperature mode: You need to press the push button inorder to enter into this mode. In this mode the sensor device FXAS21002C is active and it displays temperature in degree Celsius.


The state machine diagram is as shown:


image

Hardware details of STBC-AGM01 9-axis Sensor

It has FXAS21002C 3-axis gyroscope and FXOS8700C 6-axis integrated e-compass as part of the

Freescale Freedom development platform

 

Schematic can be referred HERE

http://www.freescale.com/files/sensors/development_tools/printed_ciruit_boards_and_schematics/FRDM-STBC-AGM01-SCH.pdf

image

We are connecting I2CSDA0 of STBC to I2C1SDA of KL46Z freedom board and

I2CSCL0 of STBC to I2C1SCL of KL46Z which are PTE0 (SDA) and PTE1 (SCL) pins of KL46Z board.

The corresponding 7-bit I2C slave address of STBC sensor board are

FXAS21002C is 0x20

FXOS8700CQ is 0x1E

 

The interrupt pins of the sensor are connected as follows:

INT1- 8700  >  J1-6  > PTD3

INT1-21002  >  J1-12 >  PTA5


The project implementation is as follows:

image

This project has the below components:


Fsl_i2c: I2CCom1

This component is configured with sensor interface with two devices FXOS8700CQ and FXAS21002C as shown below:


image

Fsl_gpio component


In the "Component Inspector" tab configure the GPIO component. The INT1_8700 output is connected to the PTD3 pin and the INT1_21002 pin to the PTA5 pin of the KL46Z MCU.

These both interrupt pins are configured as push-pull active-low outputs, so the corresponding PTD3/PTA5 pin configuration is GPIO with an interrupt on falling edge.


image

Fsl_debug_console


We are connecting the debug console to UART pins of KL46Z mcu to display the sensor output it is connected as shown

image

it is connected to PTA-1 > RxD and PTA-2 > TxD with baud rate of 19200


Wait

image

Connect the sensor board to FRDM-KL46Z board as shown below:


image


After compiling and executing the code you can see the output in an hyper terminal with baud rate of 19200 as shown below:

image

Mode-1 output window:

image


Mode-2 output (Accelerometer data):

image


Mode-3 output (Magnetometer data):


image

Mode-4 output (Gyro data):

image

Mode-5 output (Temperature data):

image


The video output is as shown below:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

The executable are attached along with this to test at your end and the project folder for quick reference:


Happy interfacing with freescale 9-axis sensor board image image image image

 




Attachments:
KL46-STBC-AGM01-srec.rar
KL46-STBC-AGM01.rar
  • Sign in to reply
  • bheemarao
    bheemarao over 10 years ago in reply to DAB

    Hi DAB,

     

    Not yet. i shall do it and update you the snap shot.

     

    Best  Regards

    Bheema Rao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Nice update,

     

    Have you checked the stability of the sensors just sitting in one place to see if there are any issues over time?

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube