English
Language : 

DRM101 Datasheet, PDF (32/56 Pages) Freescale Semiconductor, Inc – Blood Pressure Monitor Using the Flexis QE128 Family
Embedded Software Description
The fact that each module has its own .c file simplifies the process of adding and eliminating modules in
the code.
4.4 Software
4.4.1 Blood Pressure Measurement
The blood pressure measurement is part of the hardware independent layer of the application. This module
is set up to work as a state machine that is called from the main loop. When a measurement is not being
taken, the system is in an IDLE state — when a measurement starts, the state machine is changed. It then
enables the pressure sensor, RTC, and TPM modules. Next, the system begins to inflate the cuff according
to the necessary measurement. Whenever a measurement is being taken, the RTC takes an ADC
measurement of the cuff pressure and of the high pass filter every 1 ms. This measurement is what is used
by the blood pressure state machine to adjust the level of inflation by controlling the motors, using a TPM
module in the MCU. After the measurement finishes, the system disables all unused modules and goes
back to the IDLE state.
4.4.2 Capacitive Touch
The sensor is controlled using a state machine which runs in the application’s main loop. It is called
periodically and is non-blocking. This state machine uses the hardware abstraction layers that manage the
IIC and KBI modules of the microcontroller. This figure shows the state machine being used:
Blood Pressure Monitor Design Reference Manual, Rev. 0
4-2
Freescale Semiconductor