Design Article
It takes two to tango: Simplifying Linux/WinCE real-time applications development using 8- and 32-bit low-cost microcontrollers
Eric Gregori, Freescale
2/22/2011 3:48 AM EST
Simplifying software development
Let’s consider how the extra silicon can simplify software development.The 3-axis accelerometer has become a popular industrial sensor. Often used for vibration detection and orientation, now it’s even possible to use them for user input. T
he algorithms for vibration detection and tap detection are great examples of real-time algorithms that are difficult to implement under an OS. See the Freescale application note: AN3751-Frequency Analysis in the Industrial Market for more information. For example, suppose you want to implement these algorithms under a Linux system.
You have to write a custom driver to capture the raw 3-axis from the sensor via a timer interrupt at a rate of about 350 Hz, and store the data in a buffer. Then a buffer full signal triggers a user space application that grabs the data from the buffer and implements the appropriate algorithms (FFT, filtering, pulse detection). This is the point where a comparison of software development costs must be honestly evaluated. Does your software team have Linux driver development experience? If so, how much time will the development and testing of the driver take away from your actual application development time?
Now let’s take a look at doing the same thing, but off-loading the real-time to a separate MCU. The Freescale MMA9550L is an intelligent 3-axis accelerometer embedded with a 32-bit MCU. The MCU includes built-in algorithms for many common 3-axis accelerometer tasks: tap/double tap detection, filtering, threshold detection, and a FIFO queue. Out of the box, the FIFO can be used to replace a custom driver. In addition, the microcontroller/sensor allows the user to develop his/her own algorithms, and run them within the MMA9550’s flash.
The AN3751 application note discusses how to implement a FFT algorithm directly on the MCU embedded with the sensor. Using this sensor with an embedded microcontroller, you can completely off-load your 3-axis accelerometer real-time requirements from your processor’s operating system, and simply read the preprocessed data via the I2C interface. In addition, the MMA9550L can be used as a sensor hub that routes and processes data from other sensors in your system.

Fig 1: MMA9500L block diagram
Next: General-purpose I/O pins
Let’s consider how the extra silicon can simplify software development.The 3-axis accelerometer has become a popular industrial sensor. Often used for vibration detection and orientation, now it’s even possible to use them for user input. T
he algorithms for vibration detection and tap detection are great examples of real-time algorithms that are difficult to implement under an OS. See the Freescale application note: AN3751-Frequency Analysis in the Industrial Market for more information. For example, suppose you want to implement these algorithms under a Linux system.
You have to write a custom driver to capture the raw 3-axis from the sensor via a timer interrupt at a rate of about 350 Hz, and store the data in a buffer. Then a buffer full signal triggers a user space application that grabs the data from the buffer and implements the appropriate algorithms (FFT, filtering, pulse detection). This is the point where a comparison of software development costs must be honestly evaluated. Does your software team have Linux driver development experience? If so, how much time will the development and testing of the driver take away from your actual application development time?
Now let’s take a look at doing the same thing, but off-loading the real-time to a separate MCU. The Freescale MMA9550L is an intelligent 3-axis accelerometer embedded with a 32-bit MCU. The MCU includes built-in algorithms for many common 3-axis accelerometer tasks: tap/double tap detection, filtering, threshold detection, and a FIFO queue. Out of the box, the FIFO can be used to replace a custom driver. In addition, the microcontroller/sensor allows the user to develop his/her own algorithms, and run them within the MMA9550’s flash.
The AN3751 application note discusses how to implement a FFT algorithm directly on the MCU embedded with the sensor. Using this sensor with an embedded microcontroller, you can completely off-load your 3-axis accelerometer real-time requirements from your processor’s operating system, and simply read the preprocessed data via the I2C interface. In addition, the MMA9550L can be used as a sensor hub that routes and processes data from other sensors in your system.

Fig 1: MMA9500L block diagram
Next: General-purpose I/O pins
Navigate to related information

