User Manual

ZSTAR3 Sensor Board Description
ZSTAR3 Reference Design Manual, Rev. 0.1
Freescale Semiconductor 3-17
Preliminary
Pr
e
l
i
m
i
n
a
ry
Figure 3-3. ZSTAR3 Sensor Board Software Overview
For the Sensor Board operation, several of the MC13213’s hardware modules are used: Analog to Digital
Converter (ADC), Synchronous Peripheral Interface (SPI), External Interrupt Request (IRQ), Keyboard
Interrupts and General Purpose Input/Output (GPIO).
3.2 Accelerometric sensor sw controller
Reading of XYZ levels and all others operation with sensor is depends on current assembled sensor. The
ZSTAR3 sensor board supports two types of Freescale accelerometric sensors, analogue(MMA736xLT)
and digital(MMA745xL). Assembly sensor is powered by IO pins of MCU, this solution allow reach a
lowest power consumtion in sleep mode.
3.2.1 Double sensor support software model
All common control functions of sensor are physically create as two individual function. First for analogue
and second for digital sensor. Main software is using only volatile pointers on this function, that are
assigned within initialization of program, by ”
Recognise_Sensor() “ function. This function recognises an
assembled sensor and assigns right functions address to volatile RAM pointers. For example, by this way
analogue sensor is using ADC to read XYZ values of sensor and digital sensor is using digital interface,
but in source code are only one line:
p_Read_Accelerometer((void*) &(accel_data[0].x)).
3.2.2 Autocalibration process
The software uses for both types of sensor autocalibration process to get offset calibration values. It uses
a simple 0g X, 0g Y, +1g Z acceleration method. The sensor board runs autocalibration process for each g
scale of sensor, and thus uses for each g scale induvidual set of calibration values. For more details see
GPIO
ADC
KBI
Sensor
Buttons
GPIO
Sensor data
collector
Data
buffer
RF
modem
2.4GHz
S
M
A
C
LED
RF
Protocol
Handler
and
driver