224: Interrupts to Interrupt Interrupts

Embedded.fm · 22 Nov 2017 · 1h 18m · Episode 224

What this episode covers

Andrei Chichak, an embedded systems developer at CBF Systems and author of the Embedded Wednesdays blog, joins hosts Elecia White and Christopher White to explain the fundamentals of interrupts. They contrast the Arduino 'super loop' polling model with asynchronous interrupt handling, detailing how hardware triggers pre-arranged Interrupt Service Routines (ISRs) via vector tables. The discussion covers critical best practices, such as keeping ISRs short to minimize latency, using the `volatile` keyword for shared variables, and managing concurrency through flags or mutexes to avoid race conditions and nested interrupt issues.

Mentioned

Companies
CBF Systems
Products
Neopixels
Chips
Cortex M4F, PIC, ARM, 68000
Also
Arduino, VAX, Nordic chips

Other shows on the same ground, closest first.

  • The Pragmatic Embedded Podcast · 56m

    Modern Embedded Systems Programming with Miro Samek

    Miro Samek, founder and CEO of Quantum Leaps, explains why traditional embedded architectures like superloops and RTOS lead to 'spaghetti code' and concurrency bugs, advocating instead for event-driven active objects and hierarchical state machines. He details how this approach eliminates race conditions and mutexes by enforcing a 'no sharing' principle, thereby improving testability and development velocity. Samek also discusses the importance of using lightweight modeling tools to generate code from state diagrams, ensuring the model remains the source of truth in an agile workflow.

  • Oxide and Friends · 1h 15m

    Threads, async/await, Promises, Futures

    Adam Leventhal, Brian Cantrill, and guests from Oxide Computer Company discuss the difficulty of explaining async/await, prompted by Adam's attempt to teach his son C++. They contrast synchronous threading with asynchronous models, tracing the history from Solaris lightweight processes to modern Rust, Go, and Zig implementations. The group highlights significant debugging challenges in async systems, including hidden queues, non-linear response times, and the loss of stack trace context, citing painful experiences with Node.js, Erlang/RabbitMQ, and Python's Trollius library. They explore various language-specific approaches, such as Zig's explicit stack frames and Go's signal-based blocking handling, to determine when async is appropriate and how to make it debuggable.

  • The Pragmatic Embedded Podcast · 30m

    Testing on the Host vs Target

    Jeff Gable and Luca discuss the strategy of testing embedded software on the host machine versus the target hardware, arguing that host testing catches the majority of bugs while target testing is reserved for hardware-specific interactions. They introduce architectural patterns like the Model-Hardware-Controller (MHC) and the Data Model pattern to decouple business logic from hardware, enabling effective unit testing. The conversation also covers handling resource-constrained systems by optimizing last and using special integration tests to uncover low-level bugs like interrupt priority issues.

  • The Amp Hour · 1h 01m

    Our First Call In Show

    Hosts Dave Jones and Chris Gammell attempt their first call-in show, fielding questions from listeners on electronics design and ethics. They advise a caller on protecting low-level analog sensors from high-voltage induction in substations, troubleshoot I2C bus issues for a rocket stabilization prototype, and discuss the ethics of responsible disclosure for hardware security vulnerabilities with former guest Brandon Harris. The episode concludes with a discussion on the future of through-hole components for education and the challenges of judging the Hackaday Prize.

  • The Amp Hour · 1h 14m

    Reunion Impedance Matching and 2023 Predictions

    Chris Gammell hosts a reunion with past guests Alvaro, Dave Jones, and Ariel Briner to discuss the state of electronics in 2023. The group covers trends in robotics, IoT, and embedded firmware, with Alvaro detailing his work on ocean buoys using STM32 and Blues Wireless modules, and Dave Jones discussing his scaling Electron Labs. They also debate the utility of AI in engineering, the rise of RISC-V, and specific debugging challenges like Unicode handling in cellular modems and SSID-related crashes.

The summary, chapters and topics are generated from the episode’s audio by this directory, not written by Embedded.fm. The episode itself belongs to its publisher.