11

Click here to load reader

WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

Embed Size (px)

DESCRIPTION

Kernel Task Design Startup Task System Task Key Task LCD Task AudioData Task Codec Task

Citation preview

Page 1: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

WESTERN WASHINGTON UNIVERSITYKENT SYKES

2009

Audio Field Recorder System Software Design

Page 2: WESTERN WASHINGTON UNIVERSITY KENT 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

Page 3: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

Kernel Task Design

Startup TaskSystem TaskKey TaskLCD TaskAudioData TaskCodec Task

Page 4: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

Startup Task

Initialize system

Period (max) Only run once

Execution Time (max) ~100ms

Page 5: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

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

Page 6: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

Key Task

Scans for key press

Execution Time (max) 2.2 μs

Period (max) 10ms

Page 7: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

LCD Task

Writes information to LCD display

Execution Time (max) 2.5ms

Period (max) 100ms

Page 8: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

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

Page 9: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

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

Page 10: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

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%

Page 11: WESTERN WASHINGTON UNIVERSITY KENT SYKES 2009 Audio Field Recorder System Software Design

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