Skip to content

High-speed PSRAM read/write using QSPI with DMA on STM32G4, achieving 10 MB/s+ throughput . Includes fast read/write, DMA integration, and speed testing for AP Memory APS6404L.

Notifications You must be signed in to change notification settings

RpDp-git/APS6404L_STM32_DRIVER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

APS6404L_STM32_DRIVER

This repository demonstrates how to interface the AP Memory APS6404L (8MB PSRAM) with an STM32G474 using Quad-SPI (QSPI) with DMA, achieving high-speed memory transfers. The STM32G474 has only 128 KB of internal RAM, but this external PSRAM significantly expands memory capacity, making it suitable for applications like continuous data acquisition.

πŸ›  Hardware Details

  • Microcontroller: STM32G474 (128 KB SRAM)
  • PSRAM: APS6404L (8 MB, Quad-SPI)
  • Board: Custom PCB (signal integrity issues above 25 MHz)
  • QSPI Clock: Limited to ~24.3 MHz (Prescaler 6)
  • Mode: Quad-SPI (QPI) in wrap mode (32-byte bursts)
  • Transfer Type: Blocking & DMA-based QSPI transfers

πŸš€ Achieved Speeds

Transfer Mode Write Speed Read Speed
Blocking (CPU) 1.14 MB/s 1.33 MB/s
DMA (Peripheral) 10.00 MB/s 10.00 MB/s

⚑ Using DMA for both read & write boosted speeds to 10 MB/s!
⚠ Above 25 MHz, signal integrity degrades on the custom board, limiting further improvements.

πŸ›  Features

  • QSPI initialization, wrap mode setup (0x5F)
  • Fast read/write (0xEB / 0x38)
  • DMA-based QSPI transfers
  • Speed tests & data integrity checks
  • Minimal setup requiredβ€”just connect APS6404L to STM32G4's QSPI pins!

πŸ“‚ Code Overview

  • psram_aps6404l.c/h β†’ QSPI driver for APS6404L
  • main.c β†’ Initialization, speed tests, DMA callbacks
  • README.md β†’ This file 😎

πŸ›  Setup & Usage

  1. Clone the repository:
    git clone https://github.com/yourusername/STM32G4-PSRAM-DMA-QSPI.git

About

High-speed PSRAM read/write using QSPI with DMA on STM32G4, achieving 10 MB/s+ throughput . Includes fast read/write, DMA integration, and speed testing for AP Memory APS6404L.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published