1 / 21

Dynamic Donut

Dynamic Donut. Software System Design Matthew Cohn. Microcontroller – MCF52233. Bus Speed – 60MHz On-Chip Resources Programmable Interrupt Timer 32kB SRAM 18kB Required 256kB Flash 37kB Required, No Paging Communications Modules UART I 2 C QSPI. Operating System – CuteC/OS.

xandy
Télécharger la présentation

Dynamic Donut

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Donut Software System Design Matthew Cohn

  2. Microcontroller – MCF52233 • Bus Speed – 60MHz • On-Chip Resources • Programmable Interrupt Timer • 32kB SRAM • 18kB Required • 256kB Flash • 37kB Required, No Paging • Communications Modules • UART • I2C • QSPI

  3. Operating System – CuteC/OS • Implemented • Real-time, preemptive, multitasking kernel • Priority based • Automatically corrects priority inversion • Delays, with 1ms tick period • Dynamic memory allocation (memory pools) • Intertask synchronization and communication • Mutexes • Semaphores • Queues • Mailboxes

  4. Operating System – CuteC/OS • Will Not Be Implemented • Changing task states in ISRs • Includes semaphores, mutexes, mailboxes, delays inside ISR • Deleting tasks • Returning from tasks • Flags

  5. Tasks

  6. tskLoadAudio • Uses the EFSL library to load audio data from the SD card. Sends it to the appropriate decoding function (WAV or MP2) • Audio is then placed in the output circular buffer, and the buffer’s write position pointer is updated

  7. tskKeypad • Polls the states of each key • Provides software debouncing • Upon keypress, sends a message to tskSystem’s mailbox

  8. tskUART • Polls UART for new incoming data • If a command is received over UART, sends a message to TskSystem’s mailbox • If a command is queued in TskUART’s mailbox, sends the command over UART

  9. tskSystem • Maintains the system state • Uses the EFSL library to read directory listings from the SD card, navigates files and directories • Provides the user interface by calling functions in the LCD module

  10. tskLCD • Writes information to the LCD display • Handles multiple layers of information which is flattened to a final layer when displayed • Only transmits updated characters to the display

  11. Modules

  12. Audio Module • Public functions: • bool playAudio(char *path); • Checks to see if the file exists and can be open • Upon success, posts the playingAudio mutex and returns true • Upon failure, returns false • TskAudio pends on the playingAudio mutex • After the audio file has finished, playingAudio is pended on again • bool stopAudio(); • Upon success, returns true. If no audio playing, return false

  13. Audio Module • Public functions: • bool nextTransition(); • Sets a flag specifying the user has requested the system stop looping at the next available transition • If an audio file is playing, returns true • If no audio file is playing, returns false • bool setTransition(int transNumber); • Sets an automatic transition • Can be called once for each embedded loop • Returns true on success, false on error

  14. Audio Module • Public data: • INT32U audioBuffer[1765]; • 1,765 16-bit stereo samples • 441 x 4 + 1 • INT32U *writePointer; • Points past the last valid audio sample

  15. Keypad Module • No public functions • No public data

  16. UART Module • No public functions • Public data: • ccMailbox transmitMailbox for commands to transmit from the Dynamic Donut via UART

  17. Main Module • Public functions: • void audioFinished(); • Called by TskAudio when audio has finished playing • void updateStatus(); • Updates the playback time of audio when playing • Public data: • ccMailbox commandMailbox for received commands from UART or keypad

  18. I2C Module • Public functions: • void i2cInit(); • Initializes the I2C hardware • bool i2cTransmit(); • Initiates a transfer on the I2C bus. If the transfer was successful and an ACK was received, return true. Otherwise, return false. • No public data

  19. Keypad/UART Communication

  20. QSPI Communication

  21. Display Communication

More Related