English
Language : 

DRM101 Datasheet, PDF (33/56 Pages) Freescale Semiconductor, Inc – Blood Pressure Monitor Using the Flexis QE128 Family
Configure
Embedded Software Description
Idle
KBI interrupt
detected
ClearError
No fault
detected
ReadFIFO
Fault detected
ReadFault
FIFO is empty
FIFO is not
empty yet
Initially, the MPR083 is configured to work with interrupts, so the IRQ output of the sensor can wake the
MCU when needed (using a KBI pin). After the configuration has been written the state machine enters an
idle state, during which it checks for a KBI interrupt, generated by a touch event in the sensor.
After a touch is detected, the state machine starts reading the FIFO register in the MPR083. Because the
FIFO register can store up to 30 touch-event values, it is read until it empties, and the last value is the one
used. The value of the electrode pressed is stored in a global variable and another variable is used to know
if the key was pressed or released.
The fault register in the sensor is used to determine if one or more electrodes were shorted to VDD or VSS.
After a fault is asserted, the sensor electrodes will no longer be scanned until the fault is cleared.
That is why after reading the FIFO register, the program reads the fault register, checking for errors. If no
error is detected, the state machine enters the idle state again. Otherwise, if a fault is detected, the state
machine goes to an error-clearing state. This is the procedure used to clear the fault:
1. Stop the electrode scanning by writing the configuration register (stop mode).
2. Clear the fault condition by writing the fault register.
3. Start the electrode scanning again by writing the configuration register (run mode).
After these steps are done, the state machine enters the idle state again, checking for any other electrode
touch event.
Blood Pressure Monitor Design Reference Manual, Rev. 0
Freescale Semiconductor
4-3