English
Language : 

DRM101 Datasheet, PDF (34/56 Pages) Freescale Semiconductor, Inc – Blood Pressure Monitor Using the Flexis QE128 Family
Embedded Software Description
4.4.3 MRAM Storage
The system uses MRAM to store data. To do this, the MCU dedicates eight complete ports for MRAM use.
The MRAM is part of the hardware independent layer and is used by the voice generator module to read
raw audio to reproduce. The MRAM is also used by the blood pressure monitor to store the last five
readings.
4.4.4 OLED Display
The OLED display driver was taken directly from application note AN3415. In this application note, all
the necessary steps are taken to enable, initialize, and use the OLED display.
The system uses an SPI port to send commands and data to the OLED display. The system also controls
the 12 V power source that powers up the display and can therefore save power by powering down the
OLED display. The main modification implemented to this driver was a 200 ms delay between each
display refresh. This delay was added using a counter incremented by the RTC interrupt. The main state
machine for the demo dictates which screen to display and which language to use.
4.4.5 USB Communication
USB communication is done using a HC9S08JM60 that acts as a bridge between the PC and the Flexis
microcontroller. The communication to the HC9S08JM60 is done through an SCI port. All data requests
are initiated by the PC and relayed by the HC9S08JM60. Whenever the Flexis device receives a new
request through an SCI interrupt, it checks to see if USB communication is enabled, and if so, it will return
the requested data back through the SCI.
The program implemented on the HCS08JM60 is a simple application: the MCU waits to receive data
through the USB or SCI ports, then places that data into the other bus.
4.4.6 Voice Generation
All voice commands are initiated by the OLED state machine, and are further updated through interrupts
when the sampling timer overflows. Voice generation is done using two TPM modules: one channel is used
to set the sample rate of the audio, and the other channel is used to create a PWM frequency. This PWM
frequency is then passed through the audio filter, where it becomes a fixed amplitude which is sent to the
speaker. The frequency is repeated over and over until a new sample is taken from an audio file, then this
new sample value is placed in the fast frequency. The timing for these signals appears like this:
0x80
0x40
0xC0
The arrows indicate each time there is a sampling interrupt. At that moment, the system reads the audio
file to set the PWM frequency for the audio generation. This PWM frequency will remain in effect until
the next sampling interrupt. This process continues until the end of the audio file has been reached. At that
point, the system stops the PWM generation.
Blood Pressure Monitor Design Reference Manual, Rev. 0
4-4
Freescale Semiconductor