160 likes | 296 Views
FSX Racing Wideband and Monitoring System. System Software Design Frank Mirabelli. Microcontroller. 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
E N D
FSX RacingWideband and Monitoring System System Software Design Frank Mirabelli
Microcontroller • 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
Priority of Tasks • 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
Start Task • Creates other tasks • Initializes MicroC/OS, Clock, LED, and LCD • Priority: 4 • Period: Executes only once at startup • Execution Time: ~ 200 ms (max)
Button Task • Senses button presses • Debounces buttons • Priority 5 • Period: 20 ms (periodic) • Execution Time: 20 us (max) • CPU Load: 0.1%
WB Task • 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%
Sensor Task • Reads and stores TPS, RPM, and EGT inputs • Priority 7 • Period 20ms (periodic) • Execution Time: 100us (max) • CPU Load 0.5%
Display Task • 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%
Logger Task • 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)
Clock Task • Keeps track of Logger time • Priority: 10 • Period: 100 ms (Periodic) • Execution Time: ~ 500 us (max) • CPU Load: 0.5%
Terminal Task • 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
CPU Load • 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%