Download
system software design and documentation n.
Skip this Video
Loading SlideShow in 5 Seconds..
System Software Design and Documentation PowerPoint Presentation
Download Presentation
System Software Design and Documentation

System Software Design and Documentation

4 Vues Download Presentation
Télécharger la présentation

System Software Design and Documentation

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. System Software Design and Documentation Zach Hill Western Washington University

  2. General System Design • MCU – Freescale MC9S12DP512 • Bus Frequency of 16MHz • Memory Requirements • 12kB RAM • 256kB Flash • 4kB EEPROM • MicroC/OS-II • Tick period ~ 1mS

  3. Tasks • Start Task • User Interface Task • Key Task • SPI Task

  4. ISRs • MP3_ISR • USB_ISR

  5. Task Design • Main: • Initializes I²C, SPI, MicroC/OS-II, and LCD • Creates Start Task • Start Task: • Displays Boot up message • Initializes USB, PWM, Key • Creates Other Tasks • Task Priority: 4 • Task Period – once

  6. Task Design • SPI Task • Waits for semaphore from MP3_ISR and USB_ISR • Sends or receives data over SPI depending on the semaphore posted • Priority: 5 • Execution Time: ?? • Period: ??

  7. Task Design • User Interface • Handles button presses from user • Task Priority: 6 • Execution Time: 4 mS • Task Period: 10 mS • CPU Load: .4

  8. Task Design • Key Task • Scans buttons, if one was pressed updates buffer • Priority: 7 • Task Period: 10 mS • Execution Time: 50 uS • CPU Load: .005

  9. MP3_ISR • Generates a semaphore when Data Request pin on the MP3 decoder goes high • Period: 1 mS (Sporadic) • Execution time ~ 291 nS (max)

  10. USB_ISR • Generates a semaphore when SPI ready pin on USBWiz OEM board goes high • Period: 1 mS (Sporadic) • Execution time ~ 291 nS (max)

  11. Overall CPU Load • CPU load L max= .4 + .005 + .000291 + .000291 = .405582 L max= 40.56% L average = 20.2%

  12. Kernel Selection • MicroC/OS-II • Real-time preemptive multitasking kernel

  13. Modules

  14. KeyFlag Dataflow Diagram Buttons Button Input Application Button Driver Module KeyInit() KeyPend() KeyTask() key KeyCodeTable

  15. Dataflow Diagram LCD Module LCD I/O Application UITask()

  16. USB_DATARDY MP3_RDY Dataflow Diagram SPI Module SPI I/O MP3 Data to decoder SPITask() MP3 Data From USB

  17. Dataflow Diagram Application IIC Module IIC I/O Decoder Control Commands UITask() IIC PWM Control Commands

  18. MP3_RDY Dataflow Diagram ISR SPI.c MP3_SPKR.c Interrupt SPITask Pend Post ISR MP3_Isr PORTH

  19. USB_DATARDY Dataflow Diagram ISR SPI.c MP3_SPKR.c Interrupt SPITask Pend Post ISR USB_Isr SCI