Making embedded systems design patterns for great software
Interested in developing embedded systems? Since they don't tolerate inefficiency, these systems require a disciplined approach to programming. This easy-to-read guide helps you cultivate good development practices based on classic software design patterns and new patterns unique to embedded pr...
Corporate Author: | |
---|---|
Other Authors: | |
Format: | Book |
Language: | Inglés |
Published: |
Sebastopol, CA :
O'Reilly Media, Inc
2024
|
Edition: | Second edition |
Subjects: | |
See on Universidad de Navarra: | https://unika.unav.edu/discovery/fulldisplay?docid=alma991011560916108016&context=L&vid=34UNAV_INST:VU1&search_scope=34UNAV_TODO&tab=34UNAV_TODO&lang=es |
Table of Contents:
- Preface
- 1. Introduction. Embedded systems development: Compilers and languages ; Debugging ; Resource constraints ; Principles to confront those challenges
- Prototypes and maker boards
- Further Reading
- 2. Creating a system architecture. Getting started
- Creating system diagrams: The context diagram ; The block diagram ; Organigram ; Layering diagram
- Designing for change: Encapsulate modules ; Delegation of tasks ; Driver interface: open, close, read, write, IOCTL ; Adapter pattern
- Creating interfaces: Example: a logging interface
- A sandbox to play in
- Back to the drawing board
- Further reading
- 3. Getting your hands on the hardware. Hardware/software integration: Ideal project flow ; Hardware design ; Board bring-up
- Reading a datasheet: Datasheet sections you need when things go wrong ; Datasheet sections for software developers ; Evaluating components using the datasheet
- Your processor is a language
- Reading a schematic
- Practice reading a schematic: Arduino!
- Keep your board safe
- Creating your own debugging toolbox: Digital multimeter ; Oscilloscopes and logic analyzers ; Setting up a scope
- Testing the hardware (and software): Building tests ; Flash test example ; Command and response ; Command pattern
- Dealing with errors: Consistent methodology ; Error checking flow ; Error-handling library ; Debugging timing errors
- Further Reading
- 4. Inputs, outputs, and timers. Handling registers: Binary and hexadecimal math ; Bitwise operations ; Test, set, clear, and toggle
- Toggling an output: Setting the pin to be an output ; Turning on the LED ; Blinking the LED ; Troubleshooting
- Separating the hardware from the action: Board-specific header file ; I/O-handling code ; Main loop
- Facade pattern
- The input in I/O
- Momentary button press: Interrupt on a button press ; Configuring the interrupt ; Debouncing switches
- Runtime uncertainty: Increasing code flexibility ; Dependency injection
- Using a timer: Timer pieces ; Doing the math ; More math: difficult goal frequency ; A long wait between timer ticks ; Using a timer
- Using pulse-width modulation
- Shipping the product
- Further reading
- 5. Interrupts: A chicken presses a button
- An IRQ happens: Nonmaskable interrupts ; Interrupt priority ; Nested interrupts
- Save the context
- Retrieve the ISR from the vector table: Initializing the vector table ; Looking up the ISR
- Call the ISR: Multiple sources for one interrupt ; Disabling interrupts ; Critical sections
- Restore the context
- Configuring interrupts
- When and when not to use interrupts: How to avoid using interrupts ; Polling ; System tick ; Time-based events ; A very small scheduler
- Further reading
- 6. Managing the flow of activity
- 7. Communicating with peripherals
- 8. Putting together a system
- 9. Getting into trouble
- 10. Building connected devices
- 11. Doing more with less
- 12.Math
- 13. Reducing power consumption
- 14. Motors and movement
- Index.