Romram: Using QSPI RAM with RP2040's SSI in read-write mode
The article explores challenges of using external QSPI RAM with the RP2040 microcontroller, proposing a method to emulate write operations via a HardFault handler, achieving effective RAM utilization despite limitations.
Read original articleThe article discusses the challenges and solutions for using external QSPI RAM with the RP2040 microcontroller, particularly focusing on achieving read-write capabilities. The RP2040's XIP mode allows for read and execute operations but not writes, which limits the utility of external RAM. The author proposes a method to boot from flash memory, load it into RAM, and then run from RAM, utilizing simple logic gates to manage memory access. However, the inability to write directly to the RAM presents a significant hurdle.
To address this, the author suggests using a HardFault handler to emulate write operations. By leveraging the microcontroller's MPU, the handler can intercept write attempts, emulate them, and flush the cache as needed. This approach allows for the execution of unmodified software that requires RAM. The article also highlights potential pitfalls, such as the need to manage stack pointers and the timing of write operations to avoid conflicts with the XIP cache.
The performance of this setup is discussed, noting that read and execute operations are at native speed, while write speeds depend on the emulation method used. The author reports achieving a write speed of 36Mbit/s for memory copy operations, indicating that while there are complexities, the solution can be effective for applications requiring additional RAM on the RP2040. Overall, the article provides insights into the innovative use of hardware features to overcome limitations in microcontroller memory management.
Related
Rp2040-psram: A header-only C library for access to SPI PSRAM via PIO on RP2040
The GitHub repository offers a header-only C library for RP2040 microcontroller to access SPI PSRAM via PIO, enhancing data transfer speed. Compatible with various PSRAM chips. Find details at https://github.com/polpo/rp2040-psram.
The Flash Memory Lifespan Question: Why QLC May Be NAND Flash's Swan Song
Evolution of NAND Flash memory technology faces challenges with QLC NAND due to density limitations. Transition from SLC to QLC impacts write cycles and speeds. Comparison with NOR Flash, scaling issues, and pSLC cache usage in QLC SSDs are discussed. Future alternatives like 3D XPoint are considered.
Debugging an evil Go runtime bug: From heat guns to kernel compiler flags
Encountered crashes in node_exporter on laptop traced to single bad RAM bit. Importance of ECC RAM for server reliability emphasized. Bad RAM block marked, GRUB 2 feature used. Heating RAM tested for stress behavior.
Memory Mapping an FPGA from an STM32
The article details integrating an FPGA with an STM32 microcontroller using a memory-mapped interface, emphasizing simplicity, security, and performance for embedded projects through a flexible architecture and efficient data handling.
SDcard wear leveling and translation layers
The article explains the Flash Translation Layer (FTL) in SD cards, which manages data storage, mapping virtual to physical addresses, and optimizing write operations for efficient performance.
The PSRAM had a reasonable size page cache in the chip that made this memory quite responsive from a CPU perspective - a few rare cache flushes were needed, but things like DMA and bus masters (onboard radios etc..) were completely coherent and it made development much easier to manage.
My takeaway was that PSRAM was surprisingly capable (with the right can of hardware controller in place). Kudos to Realtek for getting the hardware to work without a thousand impossible to debug CPU lock ups...
1. A true, ulta-super-duper-low-power mode, and 2. Proper external memory support.
This sounds similar to the approach taken by yocto-8
Related
Rp2040-psram: A header-only C library for access to SPI PSRAM via PIO on RP2040
The GitHub repository offers a header-only C library for RP2040 microcontroller to access SPI PSRAM via PIO, enhancing data transfer speed. Compatible with various PSRAM chips. Find details at https://github.com/polpo/rp2040-psram.
The Flash Memory Lifespan Question: Why QLC May Be NAND Flash's Swan Song
Evolution of NAND Flash memory technology faces challenges with QLC NAND due to density limitations. Transition from SLC to QLC impacts write cycles and speeds. Comparison with NOR Flash, scaling issues, and pSLC cache usage in QLC SSDs are discussed. Future alternatives like 3D XPoint are considered.
Debugging an evil Go runtime bug: From heat guns to kernel compiler flags
Encountered crashes in node_exporter on laptop traced to single bad RAM bit. Importance of ECC RAM for server reliability emphasized. Bad RAM block marked, GRUB 2 feature used. Heating RAM tested for stress behavior.
Memory Mapping an FPGA from an STM32
The article details integrating an FPGA with an STM32 microcontroller using a memory-mapped interface, emphasizing simplicity, security, and performance for embedded projects through a flexible architecture and efficient data handling.
SDcard wear leveling and translation layers
The article explains the Flash Translation Layer (FTL) in SD cards, which manages data storage, mapping virtual to physical addresses, and optimizing write operations for efficient performance.