WE ARE BACK AND WORSE THAN EVER BEFORE!
Macrofab made the decision to no longer continue the pod.
- This was not a performance thing. Just made the choice to call it
- If you want to listen to 443 episodes of Stephen and Parker -> https://www.macrofab.com/podcasts/
- We opted to take a break with the intent to continue making content
- A “break” became a year
LIVE CIRCUIT – THE PODCAST
- More of the same but maybe better!
- Continue to hear from Parker and Stephen about topics in tech, engineering, and industry news.
- We will have guests on but with plans to take a different approach.
- What has changed in the last 10 years since we started a podcast!
- February 6, 2016 was the first episode of the MEP (MacroFab Engineering Podcast)
Writing to the QSPI flash on a RP2040/2350 Pico
- SPI (Serial Peripheral Interface)
- Standard 4-wire interface: SCK, MOSI, MISO, CS.
- Transfers 1 bit per clock on MOSI/MISO.
- On the RP2040, you can use any of the two hardware SPI controllers (SPI0, SPI1) on a variety of GPIO pins.
- Typically used to talk to peripherals (sensors, displays, DACs, etc.).
- Max clock rate depends on peripheral and board wiring — usually up to ~62.5 MHz practical on RP2040.
- QSPI (Quad SPI)
- Dedicated high-speed interface built into the RP2040 for external flash.
- Uses up to 6 pins: SCK, CS, plus 4 data lines (IO0–IO3).
- Transfers 4 bits per clock (quad mode) instead of 1, which is why it’s much faster.
- The RP2040 executes code (XIP = execute in place) directly from the external QSPI flash via this bus. This is why your program storage is in an external flash chip, not inside the RP2040 itself.
- Clock speed typically runs at ~133 MHz for flash access.
- Unlike regular SPI, this QSPI interface is dedicated to flash memory; you can’t just repurpose it freely
- How Streaming from FLASH to the Core works
- The RP2040 does not fetch one instruction at a time. That would be way too slow.
- Instead, the XIP block:
- Issues a QSPI read command (0xEB fast-read quad I/O).
- Streams back bursts of data (not just one instruction).
- Buffers this data in a small cache so that sequential instruction fetches don’t always hit the flash.
- The XIP cache is 16 KB, 4-way set associative with 64-byte lines.
- When the CPU executes sequential instructions, the cache keeps pulling in 64-byte blocks at a time.
- That means you get bursts of data from flash that cover multiple instructions (a 64-byte line might hold 16 ARM Thumb-2 instructions or more, depending on size).
- Performance
- With cache hits, instruction fetches run at full CPU speed (just like internal memory).
- With cache misses, the QSPI bus has to pull in a new 64-byte line, which takes on the order of tens of nanoseconds depending on flash clocking.
- The QSPI clock is usually 133 MHz in PIO-driven mode, giving effective throughput close to 67 MB/s when streaming sequentially.
- Most users just use one core…. Same with examples. Kept running into issues till Parker found this
- https://kevinboone.me/picoflash.html
- “KEVIN BOONE YOU SAVED ME!” – Parker
- “So far as I know, the save_and_disable_interrupts() function only works on the core from which it is called. This means that writing flash safely in a dual-core application, with both cores running code in flash, is likely to be extremely fiddly. “
- So what I did was implement a handshake between the two cores and then they both call the correct functions.
AI Generated Slop for S.E.O.
Keywords
podcast, engineering, AI, Raspberry Pi, Crawfest, altitude sickness, creativity, hardware design, microcontrollers, live streaming, microcontrollers, RP2040, Arduino, Qualcomm, programming, embedded systems, flash memory, PWM, development boards, engineering
Summary
In this episode of Live Circuit, Parker Dillmann and Stephen Kraig discuss the transition from their previous podcast to the new format, reflecting on their experiences with Crawfest, altitude sickness, and the evolution of engineering over the past decade. They explore the impact of AI on engineering, the advancements in Raspberry Pi technology, and the importance of creativity in the age of generative AI. The conversation is light-hearted and filled with humor, showcasing their dynamic as hosts. In this conversation, Parker Dillmann and Stephen Kraig delve into the evolution of microcontrollers, focusing on the Parallax Propeller and the RP2040. They discuss programming challenges, the advantages of the RP2040, and the implications of Qualcomm’s acquisition of Arduino. The discussion highlights the features of the RP2040, including its dual-core architecture and advanced PWM capabilities, while also addressing the challenges of flash memory management and the future of Arduino under Qualcomm’s ownership.
Takeaways
The transition to a new podcast format allows for more fluid discussions.
Crawfest experiences highlight the challenges of altitude sickness and sodium overload.
Reflecting on the past podcast journey reveals the significance of routine in their lives.
AI has transformed the way engineers approach tasks, but creativity remains a uniquely human trait.
Raspberry Pi technology has revolutionized embedded systems and microcontroller applications.
The importance of maintaining a balance between fun and professionalism in podcasting.
The hosts emphasize the need for continuous learning and adaptation in engineering.
Humor and camaraderie are key elements in their podcasting style.
The evolution of technology over the last decade has been significant, especially in AI and microcontrollers.
The hosts express excitement about the future of their podcast and the topics they will cover. The Parallax Propeller was the first microcontroller Parker learned to program.
Cost is a significant factor when choosing microcontrollers today.
Documentation can be misleading, leading to frustration in programming.
The RP2040 offers impressive performance for its low cost.
The dual-core architecture of the RP2040 allows for efficient multitasking.
Race conditions must be managed when using dual cores in programming.
The RP2040’s USB bootloader prevents bricking the device.
The Pico SDK simplifies development compared to other microcontroller environments.
The RP2040 features an advanced PWM controller with multiple channels.
Qualcomm’s acquisition of Arduino raises questions about the future direction of the platform.