1 / 24

Phantom

Digital Handheld Communication and Navigation Device. Phantom. General System Design. Freescale 9s12xep100 microcontroller 50 MHz bus frequency Chip Resources 3 of 6 SCI Ports Two interrupt driven Wake-Up Interrupts on Port H and Port J (Key + RF)

franz
Télécharger la présentation

Phantom

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. Digital Handheld Communication and Navigation Device Phantom www.trevorwilcox.com

  2. General System Design • Freescale 9s12xep100 microcontroller • 50 MHz bus frequency • Chip Resources • 3 of 6 SCI Ports • Two interrupt driven • Wake-Up Interrupts on Port H and Port J (Key + RF) • Time Channel 6 Interrupt (Used by Kernel) • Memory Usage • ROM – 21.6kB of 48kB (up to 1MB paged) • RAM – 8kB of 8kB (up to 64kB paged) • EEPROM – 500B of 2kB (up to 4kB paged)

  3. Kernel Design • uC/OS-II – A real-time preemptive multitasking kernel • Tick Period – 1ms • 3+2Tasks • 2 ISRs • 4 Flags • 1 Mutex

  4. Task/ISR Timing *Estimated **Maximum load should be considered average load because system will be sleeping during “average” load conditions.

  5. Start Task • Initializes Keypad, GPS, Clock, RF, and LCD hardware • Creates the other tasks • Period: Run once • Execution time: ~2sec

  6. RFrxISR • Triggered by RDRF (Read Data Register Full) flag on RF SCI port • Copies incoming byte to buffer and exits • When end of message is detected or the buffer is full, posts a flag notifying SysTask • Period: 0.8ms (time in between bytes at 9600bps), Behavior is sporadic • Execution time: 2µs

  7. GPSrxISR • Virtually identical to RFrxISR • Triggered by RDRF on GPS SCI port • Copies incoming byte to buffer and exits • When end of message is detected or the buffer is full, posts a flag notifying SysTask • Period: 1.7ms (time in between bytes at 4800bps) • Execution time: 2µs

  8. KeyTask • Scans keypad to detect and debounce user key presses • Posts a flag notifying SysTask of user inputted key • Period: 8ms (periodic) • Execution time: • Maximum: 10µs • Average: 8µs (estimated)

  9. ClockTask • Uses OS Delay to count current time of day and date • Posts flag notifying SysTask that one second has elapsed • Period: 1s (periodic) • Execution time: 1µs

  10. SysTask • Runs on New RF Message, New GPS Message, New Key Press and New Second events • Processes user input, including keypad multitap • Processes RF and GPS data • Provides the Graphical User Interface (GUI) • State machine structure to react to events and display correct graphical output for the event type and current user screen • Monitors power status and controls system power cycle • Saves user settings in EEPROM • Provides software tools to user

  11. SysTask (GPS) • Parses and interperets NMEA 0183 message streamed from GPS hardware • Location data is updated • Period: • Minimum: 61.2ms • Average: 30sec • Execution time: • Parsing and translating: 200µs • Maximum: 7.2ms (estimated) • Average: 7.2ms (estimated)

  12. SysTask (Messaging) • Four primary functions: interpret received messages, transmit outgoing messages, manage message cryptography, and conduct Medium Access Control (MAC) • Incoming messages are processed when newMsgflag is posted by RFrxISR. The header is examined to determine if the system is the intended recipient. If it is, an ACK message is transmitted to the sender. No ACK will be transmitted for “Broadcast-All” messages. Message content will be decrypted using aes256 module, and message data will be ready to use. • For outgoing messages, message is encrypted, headers are added, and message is sent to the LN96 for transmission • Period: • Minimum: 162.4ms • Average: 60sec • Execution time: • Parsing and translating: 300µs (estimated) • Maximum: 7.3ms (estimated) • Average: 7.3ms (estimated)

  13. SysTask (User Input) • When the newKey flag is posted by KeyTask, SysTask will retrieve that key and interpret the key’s meaning based on the current state and cursor location • Multitap function may be used depending on current state • Period: • Minimum: 16ms • Average: 120sec • Execution time: • Maximum: 7.1ms (estimated) • Average: 7.1ms (estimated)

  14. SysTask (Clock) • When newSec flag is posted by ClockTask, SysTask will update the time on the LCD if appropriate • A mutex will be used to control access to the date-time information • Period: 1 sec • Execution time: 5ms (estimated)

  15. Task/Module Relationships *Module where task code exists.

  16. Modules and Libraries

  17. Modules and Libraries

  18. Modules and Libraries

  19. Modules and Libraries

  20. GPS Communication

  21. RF Communication

  22. User I/O

  23. Date/Time Tracking

  24. Questions? • Kernel Choice • Tasks • StartTask • RFrxISR • GPSrxISr • SysTask • KeyTask • ClockTask • Data Control • Medium Access Control • GPS Communication • Power Management • Memory Usage • ? toothpastefordinner.com www.trevorwilcox.com

More Related