Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use NOR Flash Memory W25Q64: Examples, Pinouts, and Specs

Image of NOR Flash Memory W25Q64
Cirkit Designer LogoDesign with NOR Flash Memory W25Q64 in Cirkit Designer

Introduction

The W25Q64 is a 64Mb (8MB) serial NOR Flash memory device designed for high-speed data transfer via an SPI (Serial Peripheral Interface) bus. It is widely used in embedded systems for storing firmware, boot code, and other critical data. The W25Q64 offers fast read speeds, low power consumption, and high reliability, making it an ideal choice for applications requiring non-volatile memory.

Explore Projects Built with NOR Flash Memory W25Q64

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
STM32 and Arduino Pro Mini Based Wireless Data Logger with OLED Display
Image of R8 Controller: A project utilizing NOR Flash Memory W25Q64 in a practical application
This circuit integrates multiple microcontrollers (Maple Mini STM32F1, nRF52840 ProMicro, and Arduino Pro Mini) to interface with various peripherals including an SSD1306 OLED display, an SD card module, and a Si4463 RF module. The circuit is designed for data acquisition, storage, and wireless communication, with power supplied through a USB Serial TTL module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Interactive LED Display with Dual Arduino Control and Encoder Input
Image of wind-tracker: A project utilizing NOR Flash Memory W25Q64 in a practical application
This circuit features an Arduino UNO and an Arduino Nano configured for serial communication, with the UNO interfacing with a rotary encoder, an optical encoder sensor, and controlling a WS2812 RGB LED matrix. Additionally, two 74HC00 NAND gate ICs are used for logic processing, suggesting a combination of user input handling, logical decision-making, and visual output.
Cirkit Designer LogoOpen Project in Cirkit Designer
NFC-Enabled Access Control System with Time Logging
Image of doorlock: A project utilizing NOR Flash Memory W25Q64 in a practical application
This circuit is designed for access control with time tracking capabilities. It features an NFC/RFID reader for authentication, an RTC module (DS3231) for real-time clock functionality, and an OLED display for user interaction. A 12V relay controls a magnetic lock, which is activated upon successful NFC/RFID authentication, and a button switch is likely used for manual operation or input. The T8_S3 microcontroller serves as the central processing unit, interfacing with the NFC/RFID reader, RTC, OLED, and relay to manage the access control logic.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and NRF24L01 Based Wireless Remote Control
Image of P.T.S CAR , REMOTE , ADVANCE , FINAL V1: A project utilizing NOR Flash Memory W25Q64 in a practical application
This circuit features an Arduino Nano microcontroller interfaced with an NRF24L01 wireless transceiver module, powered by a 4 x AAA battery mount. Four pushbuttons are connected to the Arduino's digital inputs with pull-up resistors, and they are used to send different wireless commands via the NRF24L01 module when pressed. The Arduino's SPI interface (D11/MOSI, D12/MISO, D13/SCK) is used for communication with the NRF24L01, and digital pins D9 and D10 are used for the module's CE and CSN pins, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with NOR Flash Memory W25Q64

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of R8 Controller: A project utilizing NOR Flash Memory W25Q64 in a practical application
STM32 and Arduino Pro Mini Based Wireless Data Logger with OLED Display
This circuit integrates multiple microcontrollers (Maple Mini STM32F1, nRF52840 ProMicro, and Arduino Pro Mini) to interface with various peripherals including an SSD1306 OLED display, an SD card module, and a Si4463 RF module. The circuit is designed for data acquisition, storage, and wireless communication, with power supplied through a USB Serial TTL module.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of wind-tracker: A project utilizing NOR Flash Memory W25Q64 in a practical application
Interactive LED Display with Dual Arduino Control and Encoder Input
This circuit features an Arduino UNO and an Arduino Nano configured for serial communication, with the UNO interfacing with a rotary encoder, an optical encoder sensor, and controlling a WS2812 RGB LED matrix. Additionally, two 74HC00 NAND gate ICs are used for logic processing, suggesting a combination of user input handling, logical decision-making, and visual output.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of doorlock: A project utilizing NOR Flash Memory W25Q64 in a practical application
NFC-Enabled Access Control System with Time Logging
This circuit is designed for access control with time tracking capabilities. It features an NFC/RFID reader for authentication, an RTC module (DS3231) for real-time clock functionality, and an OLED display for user interaction. A 12V relay controls a magnetic lock, which is activated upon successful NFC/RFID authentication, and a button switch is likely used for manual operation or input. The T8_S3 microcontroller serves as the central processing unit, interfacing with the NFC/RFID reader, RTC, OLED, and relay to manage the access control logic.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of P.T.S CAR , REMOTE , ADVANCE , FINAL V1: A project utilizing NOR Flash Memory W25Q64 in a practical application
Arduino Nano and NRF24L01 Based Wireless Remote Control
This circuit features an Arduino Nano microcontroller interfaced with an NRF24L01 wireless transceiver module, powered by a 4 x AAA battery mount. Four pushbuttons are connected to the Arduino's digital inputs with pull-up resistors, and they are used to send different wireless commands via the NRF24L01 module when pressed. The Arduino's SPI interface (D11/MOSI, D12/MISO, D13/SCK) is used for communication with the NRF24L01, and digital pins D9 and D10 are used for the module's CE and CSN pins, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Embedded systems for firmware and bootloader storage
  • IoT devices for configuration and data logging
  • Consumer electronics such as smart TVs, routers, and set-top boxes
  • Automotive systems for code and data retention
  • Industrial control systems requiring robust non-volatile memory

Technical Specifications

The W25Q64 is a high-performance NOR Flash memory device with the following key specifications:

Parameter Value
Memory Density 64Mb (8MB)
Interface SPI (Serial Peripheral Interface)
Operating Voltage 2.7V to 3.6V
Maximum Clock Frequency 104 MHz
Page Size 256 bytes
Sector Size 4KB
Block Size 64KB
Erase Cycles 100,000 cycles (typical)
Data Retention 20 years
Operating Temperature Range -40°C to +85°C

Pin Configuration and Descriptions

The W25Q64 is typically available in an 8-pin SOIC package. Below is the pinout and description:

Pin Number Pin Name Description
1 CS# Chip Select (Active Low). Enables communication with the device.
2 DO (MISO) Data Output (Master In Slave Out). Transfers data from the memory to the host.
3 WP# Write Protect (Active Low). Protects specific memory regions from being written.
4 GND Ground. Connect to system ground.
5 DI (MOSI) Data Input (Master Out Slave In). Transfers data from the host to the memory.
6 CLK Serial Clock. Synchronizes data transfer between the host and the memory.
7 HOLD# Hold (Active Low). Pauses communication without deselecting the device.
8 VCC Power Supply. Connect to a 2.7V to 3.6V source.

Usage Instructions

How to Use the W25Q64 in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. SPI Connections: Connect the SPI pins (CS#, CLK, DI, DO) to the corresponding SPI pins on your microcontroller or host device.
  3. Optional Pins:
    • Connect WP# to VCC if write protection is not required.
    • Connect HOLD# to VCC if the hold function is not needed.
  4. Pull-Up Resistors: Use pull-up resistors (typically 10kΩ) on the CS#, WP#, and HOLD# pins to ensure proper operation.

Important Considerations and Best Practices

  • Voltage Levels: Ensure the operating voltage is within the specified range (2.7V to 3.6V).
  • Clock Speed: Configure the SPI clock frequency to match the device's maximum supported speed (104 MHz).
  • Erase Before Write: Always erase a sector or block before writing new data to it.
  • Data Retention: Store critical data in sectors with minimal write/erase cycles to maximize data retention.
  • ESD Protection: Use proper ESD protection measures to prevent damage to the device.

Example: Interfacing W25Q64 with Arduino UNO

Below is an example of how to interface the W25Q64 with an Arduino UNO using the SPI library:

#include <SPI.h>

// Define SPI pins for the W25Q64
#define CS_PIN 10  // Chip Select pin connected to Arduino pin 10

void setup() {
  // Initialize Serial Monitor for debugging
  Serial.begin(9600);

  // Set up SPI pins
  pinMode(CS_PIN, OUTPUT);
  digitalWrite(CS_PIN, HIGH); // Deselect the W25Q64

  // Initialize SPI
  SPI.begin();
  SPI.setClockDivider(SPI_CLOCK_DIV2); // Set SPI clock speed
  SPI.setDataMode(SPI_MODE0);          // Set SPI mode (Mode 0)
  Serial.println("W25Q64 Initialized");
}

void loop() {
  // Example: Read Manufacturer ID
  digitalWrite(CS_PIN, LOW); // Select the W25Q64
  SPI.transfer(0x90);        // Send "Read Manufacturer/Device ID" command
  SPI.transfer(0x00);        // Send dummy bytes as per datasheet
  SPI.transfer(0x00);
  SPI.transfer(0x00);
  byte manufacturerID = SPI.transfer(0x00); // Read Manufacturer ID
  byte deviceID = SPI.transfer(0x00);       // Read Device ID
  digitalWrite(CS_PIN, HIGH); // Deselect the W25Q64

  // Print IDs to Serial Monitor
  Serial.print("Manufacturer ID: 0x");
  Serial.println(manufacturerID, HEX);
  Serial.print("Device ID: 0x");
  Serial.println(deviceID, HEX);

  delay(1000); // Wait 1 second before repeating
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Device Not Responding:

    • Ensure the CS# pin is correctly toggled (LOW to select, HIGH to deselect).
    • Verify SPI connections and ensure proper pin mapping.
  2. Incorrect Data Read/Write:

    • Check the SPI clock speed and mode. The W25Q64 operates in SPI Mode 0.
    • Ensure the memory sector is erased before writing new data.
  3. Write Protection Issues:

    • Verify the WP# pin is connected to VCC if write protection is not required.
    • Check the status register to ensure the write protection bits are configured correctly.
  4. Data Corruption:

    • Avoid power interruptions during write or erase operations.
    • Use decoupling capacitors near the VCC pin to stabilize the power supply.

FAQs

Q: Can the W25Q64 operate at 5V?
A: No, the W25Q64 operates within a voltage range of 2.7V to 3.6V. Use a level shifter if interfacing with a 5V system.

Q: How do I erase the entire memory?
A: Use the "Chip Erase" command (0xC7) to erase the entire memory. Note that this operation may take several seconds.

Q: What is the difference between sector and block erase?
A: A sector erase (4KB) clears a smaller portion of memory, while a block erase (64KB) clears a larger portion. Use sector erase for finer control.

Q: How do I check if a write or erase operation is complete?
A: Read the status register and check the Write-In-Progress (WIP) bit. The operation is complete when WIP = 0.