mma9553, fxlc95000 and isf - eccn.comimage.eccn.com/gcszj/freescale/150708/webinar_ppt.pdf · mem...
TRANSCRIPT
TM
External Use 2
Motion Sensing PlatformsKey Products 2014
Sample Prod SRP$ ApplicationsMMA955xL 32-Bit 16K Flash CPU and 3-axisAccelerometer Tilt Measurement
Vibration MonitorPedometerHome HealthPower ManagementeCompassAsset TrackingCollision Recorder
FXLC95000CL 32-Bit 128K Flash CPU and 3-axis Accelerometer• Embedded ±2, ±4, ±8 g 3-axis 16-Bit accelerometer module• 32-Bit CF V1 CPU with MAC multiply and accumulate block• 16K or 128K on-chip Flash, 2K or 16K on-chip SRAM• SPI, I²C (master and slave), GPIO, ADC, PWM• 1.8V , 3 x 3 x 1 mm QFN, or 3 x 5 x 1 mm QFN• Pre-flashed Freescale firmware (3 Versions) or MQX/ISF• CodeWarrior CW10.x supported
Part Number Firmware User Memory Size
startingat
1.79
MMA9559L Basic 14K Flash 1.5K SRAM Now NowMMA9550L Infrastructure 6.5K Flash 0.5K SRAM Now NowMMA9551L Infrastructure and Gesture 4.5K Flash 0.5K SRAM Now NowMMA9553L High end pedometer 1.5K Flash 0.2K SRAM Now NowFXLC95000 MQX/ISF enabled 128K Flash 16K SRAM Now Now
3-Axis MEMS Accelerometer
ROM ColdFire 32-Bit
V1 Core
SPII2C
FlashRAMADCGPIO
TM
External Use 3
MMA955xL At-a-Glance
3
Customer/Third PartyInnovation
Applications
Scheduler Communications
MMA955xL Sensor Sensing Software
Power Management
Inertial Sensor
ColdFire V1 32-Bit Processor
Connectivity:I2C/SPI
Pressure TouchGyro Magnetics Up to 12 Sensor Components
TM
External Use 4
Xtrinsic MMA955xL (Eve)3-Axis Accelerometer plus 32-bit ColdFire MCU
Differentiating Points− Intelligent Motion Platform with embedded libraries
− Sensor hub capability
− Power management features and low power modes
Product Features− 1.71 to1.89V supply voltage
− Output data rate (ODR) 488 Hz
− +/-2g, 4g, 8g configurable dynamic ranges available
− 14/12/10/8 bit resolution available
− 16K Flash, 2K RAM
Typical Applications− Mobile: Phones, Tablets, eReaders
− Controllers: Remotes, Games
− Sports Monitoring
Package3x3x1mm LGA, 0.5mm pitch
AvailabilitySamples: NOWProduction: January 2013
VariationsMMA9550L
Inf rastructure only functionsUser Flash: 6.5 KbytesUser RAM: 576 bytes
MMA9551LInf rastructure plus gesturesUser Flash: 4.5 KbytesUser RAM: 452 bytes
MMA9553LInf rastructure plus pedometerUser Flash: 1.5 KbytesUser RAM: 200 bytes
MMA9559LLightweight Inf rastructureUser Flash: 14 KbytesUser RAM: 1.5 bytes
TM
External Use 5
Typical Logical Installations with FXLC95000
FXLC 95000
FXLC 95000
Gyro
Mag
FXLC 95000
Gyro
Mag
Apps Processor1 2
3
TM
External Use 6
Xtrinsic FXLC95000CL32bit MCU Sensor Fusion Hub with Accelerometer
• Differentiating Points− System in Package: 32-bit MCU and 3-axis
accelerometer− Open MCU architecture enables
differentiated creativity− First open programming model with library
support (Intelligent Sensing Framework)− Compute and actuate locally− Best in class accelerometer noise &
resolution performance• When to choose FXLC95000CL
− Sensor hub managing multiple sensors: FSL & others
− Pass through data as needed i.e. heading− Perform 6-axis fusion Mag/accel cal/ecompass Gyro/accel
• When to choose Kinetis− Sensor fusion for 3+ sensors –> M0+− Sensor fusion and much more –> M4
3-axis accelerometer plus Coldfire MCU that enables scalable, autonomous, high precision multi-sensor hub solutions with local compute and sensors management in an open architecture
Specification FXLC95000CL KL25 K20
Core
Coldfire V1 w/embedded
accelerometerARM® Cortex™
M0+ARM® Cortex™
M4Sensor Hub √ √ √
Sensor Fusion 6-axis Ecompass Cal9-Axis Fusion3 sensors+
9-Axis FusionMultiple sensors
+ other computations
Euler Angles √ √ √Quarterions √ √ √Rotation Matrices
Available if req’d(see your FAE for help)
√ √
ISF Supported √ √* √*
TM
External Use 7
Leveraging Established MMA955xL Portfolio
MMA9550L MMA9551L MMA9553L MMA9559L FXLC95000CL
Description3-axis Accel + 32-bit
Coldfire V13-axis Accel + 32-bit
Coldfire V13-axis Accel + 32-bit
Coldfire V13-axis Accel + 32-bit
Coldfire V13-axis Accel + 32-bit
Coldfire V1
Package size and type 3x3x1mm LGA-16 3x3x1mm LGA-16 3x3x1mm LGA-16 3x3x1mm LGA-16 5x3x1mm LGA-24
MCU coreColdFire-V1with MAC
ColdFire-V1with MAC
ColdFire-V1with MAC
ColdFire-V1with MAC
ColdFire-V1with MAC
Memory size (kByte)Flash 16 16 16 16 128
RAM 2 2 2 2 16
GPIO count 10 10 10 10 16
Serial Comm Interfaces I2C 2 (Master & Slave) 2 (Master & Slave) 2 (Master & Slave) 2 (Master & Slave) 2 (Master & Slave)
SPI 1 (Slave) 1 (Slave) 1 (Slave) 1 (Slave) 2 (Master & Slave)
IO voltage range (V) 1.8 1.8 1.8 1.8 1.62-3.6
AccelerometerRange (±g) 2 / 4 / 8 2 / 4 / 8 2 / 4 / 8 2 / 4 / 8 2 / 4 / 8
Resolution (bits) 10 / 12 / 14/ 16 10 / 12 / 14/ 16 10 / 12 / 14/ 16 10 / 12 / 14/ 16 10 / 12 / 14/ 16
Typical Current drainunder nominal power
supply
Fast Speed 3.1mA @8MHz 3.1mA @8MHz 3.1mA @8MHz 3.1mA @8MHz 5.4mA @16MHz
Slow Speed 15µA @62.5kHz 15µA @62.5kHz 15µA @62.5kHz 15µA @62.5kHz 15µA @62.5kHz
FirmwareInfrastructure-only
functionsInfrastructure +
gesturesInfrastructure +
pedometerLightweight
infrastructureMQX, Xtrinsic ISF,
eCompass
Development tools KITMMA9550LEVM KITMMA9551LEVMKITMMA9550LEVM
with FW updateMMA9559LKUBE KITFXLC95000EVM
TM
External Use 8
I2C Standard
• MMA9553L follows I2C standard as below.
TM
External Use 9
Understanding of Command Operation with MMA9553L for I2C• Slave address: 0x4C• Register address: Mailbox address (MB address)• MMA9553L has 32 bytes mailbox for access
MB: 0x00
MB: 0x01
MB: 0x02
·····
MB: 0x10
MB: 0x11
·····
MB: 0x1C
MB: 0x1D
MB: 0x1E
MB: 0x1F
Mailbox
TM
External Use 10
Mailbox Commands Formats
• Mailbox commands must be included in data field of I2C for read and write command.
• Example for I2C− Write command: ST + Device ID/W + Mailbox Addr(0x00, fixed) + APP_ID +
Command/upper byte offset + Lower byte offset + Requested number of bytes + Write Data + SP
− Read command: ST + Device ID/W + Mailbox Addr + APP_ID + Command/upper byte offset + Lower byte offset + Requested number of bytes + SP
• Mailbox is updated by requested APP_ID and command through read/write function.
TM
External Use 11
Mailbox Response Formats
• Mailbox response formats are as below.• Example for I2C− Read register: ST + Device ID/W + Mailbox Addr + SR + Device ID/W + Read
bytes + SP
TM
External Use 12
Mailbox Command Box Detail
• For write command, 5 blocks are necessary.− APP_ID, Command, Byte offset, Requested number of bytes, Write data
• For read command, 4 blocks are necessary.− APP_ID, Command, Byte offset, Requested number of bytes
TM
External Use 13
Application ID
• Refer to the table of APP_ID.• Pedometer APP_ID is 0x15.
TM
External Use 14
Pedometer Memory Maps
• Pedometer has two register maps for configuration and status.• Each register is automatically updated on Mailbox by command.
TM
External Use 15
Reference
• MMA955xLSWRM.pdf− MMA955xL Intelligent, Motion-Sensing Platform Software Reference
Manual• MMA9553LSWRM.pdf− MMA9553L Intelligent Pedometer Platform Software Reference Manual
16TM
• Maybe some stuff you currently run on the Host Processor• Sensor management• Sensor fusion
apps processor runningsensor fusion
sensor hub runningsensor fusion
Pow
er
CPU Loading
Power savings
• Stuff for which using the Host Processor is overkill or too expensive
• Event recognition (e.g. Sleep/Wake)
17TM
FXLC95000 Evaluation Module
FXLC95000/MAG3110 Evaluation Module
KITFXLC95000EVM Motion-Sensing Platform
Development BoardKITFXLC95000EVM Intelligent Motion-Sensing Platform Development Board
• Hardware:• Includes KITFXLC95000EVM Motion-Sensing Platform Development Board• Includes FXLC95000 evaluation module
• Includes Quick Start Guide• Available at: www.freescale.com/sensingplatform• More information at www.freescale.com/sensortoolbox
Coming soon: MAG3110 Daughter card
Software• Xtrinsic Intelligent Sensing Framework: www.freescale.com/ISF• MQX: www.freescale.com/MQX• CodeWarrior: www.freescale.com/CodeWarrior
Beyond Silicon—Training and Support• FXLC95000CL Datasheet• FXLC95000CL Reference Manual• FXLC95000CL ISF Software Reference Manual• ISF Development Training Modules
18TM
Things it has to know how to do:• Send /Receive I2C messages• Register map/configuration for each particular
sensor• Schedule periodic processing• Control the power modes• Handle Interrupt Vector Table• Configure board peripherals• Compute useful outputs (Application Code)• Send and receive host messages ( USB, UART)• Understand the host application-level protocol• Stack pointer management/Context switching• Implement concurrency mechanisms (mutex,
semaphore, etc)• Perform Boot-up board initialization
Monolithic Application
High-level code
Low-level code
High-level code
Low-level code
19TM
The rest is just stuff you have to do to get it all to work
Things it has to know how to do:
• Send /Receive I2C messages
• Register map/Configuration for each particular sensor• Schedule periodic processing
• Control the power modes
• Handle Interrupt Vector Table
• Configure board peripherals• Compute useful outputs (Application Code)• Send and receive host messages ( USB, UART)
• Understand the host application-level protocol
• Stack pointer management/Context switching• Implement concurrency mechanisms (mutex, semaphore, etc)
• Perform Boot-up board initialization
Monolithic Application
High-level code
Low-level code
High-level code
Low-level code
20TM
• Compute useful outputs (Application Code)
• Send /Receive I2C messages
• Register map/Configuration for each particular sensor• Schedule periodic processing
• Control the power modes
• Handle Interrupt Vector Table
• Configure board peripherals
• Send and receive host messages ( USB, UART)
• Understand the host application-level protocol
• Stack pointer management/Context switching
• Implement concurrency mechanisms (mutex, semaphore, etc)
• Perform Boot-up board initialization
One Approach:
High-level code
Low-level code
Reuse this stuff over and over
Defined Interface
Application Code
21TM
Functionality ISF Component
•Send /Receive I2C messages I2C protocol Adapter
•Register map/Configuration for each particular sensor
Sensor Adapters
•Schedule Periodic Processing Bus Manager
•Control the power modes Power Management
•Handle Interrupt Vector Table System Utilities
•Configure board peripherals Device Control
•Compute useful outputs (Application Code) This is the only thing you do want to write
•Send and receive host messages ( USB, UART)
Command Interpreter
•Understand the host application-level protocol Host Proxy
•Stack pointer management/Context switching Task Scheduler
•Implement concurrency mechanisms (mutex, semaphore, etc)
Synchronization
•Send external interrupts to host Host Interrupt Control
•Perform Boot-up board initialization Powerup/Boot
What does it do for you?
I2C
AccelMagGyro
Bus Mgmt
Power Mgmt
Sys Util
Device Ctrl Mem Map
Cmd Interp
Host Proxy
Scheduler
Sync
Host Int Ctrl
PwrUp Boot
Embedded Apps
UserUserUser
22TM
Embe
dded
Inte
llige
nt S
enso
r Env
ironm
ent
EmbeddedServices
IntegratedServices
SystemServices
OSServices
HardwareAbstraction
Embedded AppsContext/IntentGesturesSignal Proc
Device Mgmt
Comm Sensor Fusion Sensor Mgmt
Appl Support
Cmd Interp
Host Proxy
Host Int Ctrl
Device Msg’ing
I2CSPIGPIODevice
Ctrl
PwrUp Boot
Power Mgmt
Calibration Accel
Scheduler
Sync
Tmr/Clk
Timer Abstr
Sync Abstr
Mem Mgmt
UserUserUser
UserUserUserUserUserUser
Sys Util
Mem Map
Jolt
Config Mgmt
Filters
Pattern Recognition
PedometerContext Det Intent MgmtSleep/Wake
Low G
Hi G P/L
Status Mgmt
Tap
Pulse
Compass
Events
Sensor Mgr
MagGyro
TempExtrn
Tilt
9 axis fusion
Bus Mgmt
Gesture Mgr
Auto S/W
Test Support
Digital Sensor Abstr
6 axis fusion
23TM
Component SensorApp1 Sensor App2 Sensor App3 Sensor App4I2C protocol Adapter Sensor Adapters Sensor Manager Bus Manager Power Management System Utilities Device Control Command Interpreter Host Proxy Task Scheduler (MQX) Synchronization (MQX) Host Interrupt Control Powerup/Boot
24TM
• ISF High-Level Design Goals• Faster time to market
• Allow application developers to focus on their real areas of expertise
•We want them to get the highest bang-for-the-buck
Do this by abstracting details they don’t want to deal with.Do this for work at all levels up and down the stack
25TM
Intelligent Sensing Framework
Sensor Manager
MQX RTOS
Power Manager
Device Messaging
Command Interpreter
Host Proxy
Hardware
Intelligent Sensor Hardware
ISF Abstraction Interfaces
ISF Bus Protocol Extensions
Embedded ApplicationEmbedded Application
Embedded Applications
Pub/Sub Event-Based Sensor Data
Sensor Abstraction Interface
Internal Sensor Adapter
Bus Manager
Host Processor
- OR -
Sensor Data Updates
Sensor Configuration
I/O Buffers
Simplified Power
Mgmt APIs
ISF Sensor Extensions
Customer Developed
Other Freescale SW
Protocol DriverProtocol DriverI2C Protocol
Driver
External Sensor
External Sensor
External Sensor
LEGEND:
INT_OUT
ISF Components
Registered Callbacks
Sensor AdapterSensor AdapterSensor Adapter
Main Sensor Data Flow
Main Host Interface Flow
26TM
• Base for ISF development on FXLC95000:• CodeWarrior 10.3• ISF1P095K_CORE_LIB - Base framework for application development for the FXLC95000
• FSL_MQX_3.7 – Core MQX RTOS Installation
• FSL MQX 3.7 BSP for FXLC95000 - Updates to MQX 3.7 to support FXLC95000
• Sensor Adapters:• ISF1P095K_MAG3110_ADAPTER_LIB - ISF component to manage the FSL
MAG3110
• ISF1P095K ECOMPASS ADAPTER LIB - ISF component to manage a virtual eCompass sensor
• Starter Project Template:• ISF1P095K_GETACCELDATA_PROJ - CodeWarrior Project
27TM
• This gets installed on your computer via the ISF website Download:− ISF1P095K_CORE_LIB
• Additional Sensor Adapters get added in as they are installed:− ISF1P095K FXAS21000 ADAPTER LIB
− ISF1P095K ECOMPASS ADAPTER LIB
− ISF1P095K_MAG3110_ADAPTER_LIB
28TM
• GetAccelData−The project used in the first ISF Training Module.GetAccelData
Build
Include
Source
ISF_Source
.project.cproject
All Include files
Project Source(your app code)
Project-Specifc ISF/System
configuration code
isf_sensor_configuration.c
isf_sensor_configuration.h
29TM
• Define the sensors available in the system
• This changes a little more often than the channels config.
• We provide a default system configuration for Galla
• It’s recommended that you copy and customize
these files for each application you write to
include the sensors you need for your app.
Source/ISF_Source/isf_sensor_configuration.c
Include/isf_sensor_configuration.h
30TM
• ISF1P095K_SW_REFERENCE_RM
31TM
• ISF1P095K_API_REFERENCE_RM
32TM
• Part of Template• Included by example in Template• Placeholder in Template
Includes, Defines, and Prototypes
Main_task
Initialization code
Sensor subscription code
Main Loop
Wait for sensor data
Set sensor settings
Call Subscribe
Begin Sensor Data
Retrieve sensor data
Use sensor data
Shutdown/Cleanup code
ISF provides some Template/Example
projects to get you going.
The first is the GetAccelData Project used in some of our
Training Modules
33TM
GPIO OutputsFrom FXLC95000
GPIO OutputsFrom QE64
The Bridge code installed on your boardsRelays GPIO Outputs from the Intelligent Sensor to the EVM LEDs.
FXLC95000 QE64(Coldfire)
Mag
I2C
• All sensor mgmt, fusion and the embedded app execute on the FXLC95000
• The QE64 only relays GPIO signals to the LEDs.
34TM
• What it does:• GetAccelData is a very small demo application that:
−Subscribes to the FXLC95000 internal accelerometer−Puts accelerometer XYZ data in the mailboxes
35TM
• Open CodeWarrior and create a new workspace\(I made mine C:\Freescale\workspaces\DFAE_Training_Demo)
• Copy the zipped GetAccelData Project from the C:\Freescale\DFAE_Training_Materials directory to your CodeWarrior workspace top-level directory and unzip it (Right click->Winzip->Extract to here).
• In Windows Explorer, navigate into the project’s Builddirectory and find the .project file- This is the file you will import into CodeWarrior.
36TM
• In the CodeWarrior C/C++ Perspective:− Drag and drop the .project file into the CodeWarrior Projects
window
37TM
• Right Click on the Project Name• Select “Clean Project”
• Then select• “Build Project”
38TM
1. Bring up the “Run Configuration Pop-up
2. In the Run Configurations Pop-up:Press the “New” Button
39TM
• Ensure the Application is set properly. Use the “Search Project” Button if in doubt.
• Create a Connection Target
40TM
• Choose “Hardware or Simulator Connection”
• And hit “Next”
41TM
• Type any name you like in the Name field− I use: FXLC95000 Connect
• Hit “New” Target
42TM
1. Enter a Target Name− I use: FXLC95000
Target
2. Expand the “Target Type” dropdown
3. Expand the “coldfireFXLC95xxx” group
4. Select “FXLC95000”
5. Click Finish
43TM
• Choose the P&E multilink choice from the “Connection Type” dropdown
• And hit “Finish”
44TM
• Hit “Run”
45TM
• BDM connector attached
• Board Powered On
Green “Power” LED
46TM
Sensor Manager
Embedded Applications
Pub/Sub Event-Based Sensor Data
Sensor Abstraction Interface
Sensor Data Updates
Sensor Configuration
I2C Protocol Driver
Sensor Adapter
Device Messaging
Bus Manager
• Just wants sensor data• Doesn’t need to understand specifics of sensor
control or configuration
• Knows sensor control• Doesn’t need to understand specifics of sensor
configuration
• Knows sensor configuration• Doesn’t need to understand specifics of channel
communications or periodic timing
• Knows periodic timers and bus serialization• Doesn’t need to know what is done in each
registered callback
Knows channel communicationsDoesn’t need to understand specific bus protocols
Knows specific bus protocols
47TM
MMA9555 EVM quick startUnpack the Kit• Unpack the board. Verify package contents according to the kit website: freescale.com/sensortoolbox. • Assemble the hardware by connecting the development board to the USB interface board. Both of these board types have a small arrow to indicate where to connect. See the image below. More information can be found at freescale.com/sensingplatform or freescale.com/sensortoolbox
Download Latest Software • At freescale.com/sensortoolbox download the latest software version. • This kit uses the Sensor Toolbox software. Follow the on-screen instructions to install the communication driver for the tool. Check back occasionally for software updates.
Turn It On• Plug in the USB and turn the board on using the power switch. • Run the Sensor Toolbox link on your desktop. • Explore other sensor kits at freescale.com/sensortoolbox.
48TM
将EVM板与电脑连接好
49TM
如何烧录MMA95551. 打开CW10.6
2. 将.project工程文件拖到CW工作区
50TM
如何烧录MMA95553. 右击工程, 选择Run As,Codewarrior 4. 选择SixDir MMA9553L Download
51TM
如何烧录MMA95555. 如果看见这个对话框,断电然后再上电,最后点击OK
6. 请忽略图示的错误信息,如果看到checksum verification successful, 这说明MMA9555烧录成功
52TM
确认COM是否安装好,EVM板上的串口芯片是FTDI FT232,到FTDI官网下载相应的驱动
打开 MMA9553L Pedometer V0.9软件,该软件需要联系Avnet FAE进行提供
53TM
通过上位机,将参数设定到MMA9555 读取计步器的数据
54TM
进入低功耗状态 唤醒计步器
55TM
MMA9555 6轴检测可以用作睡眠监测功能
TM
© 2014 Freescale Semiconductor, Inc. | External Use
www.Freescale.com