16
System Software Design Frank Mirabelli

System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Embed Size (px)

Citation preview

Page 1: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

System Software Design

Frank Mirabelli

Page 2: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory

512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes RAM

Required Memory 10K bytes ROM 5K bytes RAM 256K bytes of Flash

MicroC/OS-II Real-time preemptive multitasking kernel 1 ms tick period

Page 3: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Start Task Priority: 4 Button Task Priority: 5 WB Task Priority: 6 Sensor Task Priority: 7 Display Task Priority: 8 Logger Task Priority: 9 Clock Task Priority: 10 Terminal Task Priority: 11

Page 4: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Creates other tasks Initializes MicroC/OS, Clock, LED, and LCD Priority: 4 Period: Executes only once at startup Execution Time: ~ 200 ms (max)

Page 5: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Senses button presses Debounces buttons Priority 5 Period: 20 ms (periodic) Execution Time: 20 us (max) CPU Load: 0.1%

Page 6: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Controls the operation of the Wideband Sensor

Heats and holds sensor in operating range

Reads and stores A/F ratio reading Priority 6 Period 20ms (periodic) Execution Time: 1ms (max) CPU Load 5%

Page 7: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Reads and stores TPS, RPM, and EGT inputs

Priority 7 Period 20ms (periodic) Execution Time: 100us (max) CPU Load 0.5%

Page 8: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Pulls data from sensor variables and output them to displays

Controls communication to LCD, LED spectrum and 3 Digit displays

Priority 8 Period 500ms (periodic) Execution Time: 10ms (max) CPU Load 2%

Page 9: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Pulls data from sensor variables and output them to stores in Flash

Priority 9 Period 500ms (periodic – when running) Execution Time: 10ms (Logging) Execution Time: 50ms (Clearing) (max) CPU Load 10% (max)

Page 10: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Keeps track of Logger time Priority: 10 Period: 100 ms (Periodic) Execution Time: ~ 500 us (max) CPU Load: 0.5%

Page 11: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Outputs Logger data to Computer Priority 11 Period 20ms (periodic) Execution Time: 20us (normal operation) Execution Time: 20ms (Downloading) CPU Load 100% Note: Lowest priority task, will not block

when downloading Note: downloads RARELY happen

Page 12: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

L max = (20 us) + (1 ms) + (100 us) + (10ms)

(20 ms) (20 ms) (20 ms) (500ms)

+ (500us) + (500us) + (20us) (100ms) (20ms) (100ms) L Max = 100% L Average = 17.5%

Page 13: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes

Module Tasks Functions Global Variables

Main.c Start TaskSensor TaskWB TaskDisplay TaskLogger Task

GetTime() EGTValWBValTPSValRPMVal

User.c Terminal TaskButton Task

UserInit()Getchar()Putstrng()

Clock.c Clock Task EnableFlag()ClearFlag()SetTimeHrs()SetTimeMins()SetTimeSecs()

LED.cTod Morton(Modified)

LEDInit()LEDDisp()LEDSpec()

LCD.c

Tod Morton

All LCD Functions

ProsEeprom.c

Freescale/Tod Motron

ConfigECLKDIVEEWordWriteEESectErase

Page 14: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes
Page 15: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes
Page 16: System Software Design Frank Mirabelli. Motorola MC9S12DP512 Bus Frequency 24 MHz Available Memory 512K bytes Flash EEPROM, 4K bytes EEPROM, 14K bytes