Click here to load reader
Upload
rosalyn-dalton
View
212
Download
0
Embed Size (px)
DESCRIPTION
Kernel Task Design Startup Task System Task Key Task LCD Task AudioData Task Codec Task
Citation preview
WESTERN WASHINGTON UNIVERSITYKENT SYKES
2009
Audio Field Recorder System Software Design
General System Design
MCU-Freescale MCF51QE12850.33 MHz Bus FrequencyOn-Chip Resources
128 kB Flash 8 kB RAM
Memory Requirements 40 kb Flash 6 kB RAM
Timeslice Kernel 22.675 μs Timeslice
Kernel Task Design
Startup TaskSystem TaskKey TaskLCD TaskAudioData TaskCodec Task
Startup Task
Initialize system
Period (max) Only run once
Execution Time (max) ~100ms
System Task
Provides user interface Calls LCD functionsDetermines system stateUses EFSL (embedded file systems library) to
navigate files on the SD card
Execution time (max) 30μs
Period (max) 100ms
Key Task
Scans for key press
Execution Time (max) 2.2 μs
Period (max) 10ms
LCD Task
Writes information to LCD display
Execution Time (max) 2.5ms
Period (max) 100ms
AudioData Task
Loads or stores audio data from the SD card using the EFSL Library
Maintains audio sample buffer
Execution Time (max) 4ms
Period (max) 5.8ms
Codec Task
Control Codec function via IICGet audio samples from the audio buffer in
playback via modified SPISend audio samples to the audio buffer in
record mode via modified SPIExecution Time (max)
6 μsPeriod (max)
22.68 μs
CPU Load
Task Name Execution Time (max)
Period (max) CPU Load (max)
Startup Task 100ms Run once -System Task 30μs 100ms .0003
Key Task 2.2μs 10ms .0002LCD Task 2.5ms 100ms .0250
AudioData Task 4ms 5.8ms .6900Codec Task 6μs 22.675μs .2650
MAX CPU LOAD = 98%
Modules
Module Name Tasks Public Functions and Data
recorder.c Startup TaskSystem Task
AudioDataTaskCodecTask
PlayAudio();RecordAudio();
StopAudio();FfdAudio();RwdAudio();
lcd.c LCDTask All LCD functionskeypad.c KeyTask None
iic.c - iicInit();iicTransmit();
spi.c - InitSPI();WriteSPI();ReadSPI();
EFSL – Embedded File System Library © Lennart Ysboodt, Michael De Nil 2005