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

How to Use w25qxx: Examples, Pinouts, and Specs

Image of w25qxx
Cirkit Designer LogoDesign with w25qxx in Cirkit Designer

Introduction

The W25QXX series is a family of high-performance serial NOR flash memory devices with a Serial Peripheral Interface (SPI). These devices are widely used for data storage in embedded systems due to their compact size, low power consumption, and high-speed operation. The W25QXX series supports a variety of capacities, ranging from 512 Kbits to 128 Mbits, making it suitable for applications such as firmware storage, data logging, and boot code storage.

Explore Projects Built with w25qxx

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO GSM Communication Hub with QR Code Reader and LCD Interface
Image of park system: A project utilizing w25qxx in a practical application
This circuit is designed to function as a communication and control system with cellular capabilities, QR code scanning, and display output. It is built around an Arduino UNO microcontroller, interfaced with a SIM900A module, a QR code reader, and an I2C LCD screen, powered by a series of 18650 batteries through a boost converter. Tactile switches provide user interaction, and the Arduino's embedded code controls the operation of the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Satellite-Based Timing and Navigation System with SDR and Atomic Clock Synchronization
Image of GPS 시스템 측정 구성도_Confirm: A project utilizing w25qxx in a practical application
This circuit appears to be a complex system involving power supply management, GPS and timing synchronization, and data communication. It includes a SI-TEX G1 Satellite Compass for GPS data, an XHTF1021 Atomic Rubidium Clock for precise timing, and Ettus USRP B200 units for software-defined radio communication. Power is supplied through various SMPS units and distributed via terminal blocks and DC jacks. Data communication is facilitated by Beelink MINI S12 N95 computers, RS232 splitters, and a 1000BASE-T Media Converter for network connectivity. RF Directional Couplers are used to interface antennas with the USRP units, and the entire system is likely contained within cases for protection and organization.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
Image of Pulsefex: A project utilizing w25qxx in a practical application
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
FTDI to UART Adapter with J26 Connector
Image of J26 CLOSEUP: A project utilizing w25qxx in a practical application
This circuit connects an FTDI USB-to-serial converter to a standard serial interface via a J26 connector. It facilitates serial communication by linking the ground, transmit, receive, data terminal ready, and request to send signals between the FTDI chip and the J26 connector.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with w25qxx

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 park system: A project utilizing w25qxx in a practical application
Arduino UNO GSM Communication Hub with QR Code Reader and LCD Interface
This circuit is designed to function as a communication and control system with cellular capabilities, QR code scanning, and display output. It is built around an Arduino UNO microcontroller, interfaced with a SIM900A module, a QR code reader, and an I2C LCD screen, powered by a series of 18650 batteries through a boost converter. Tactile switches provide user interaction, and the Arduino's embedded code controls the operation of the circuit.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GPS 시스템 측정 구성도_Confirm: A project utilizing w25qxx in a practical application
Satellite-Based Timing and Navigation System with SDR and Atomic Clock Synchronization
This circuit appears to be a complex system involving power supply management, GPS and timing synchronization, and data communication. It includes a SI-TEX G1 Satellite Compass for GPS data, an XHTF1021 Atomic Rubidium Clock for precise timing, and Ettus USRP B200 units for software-defined radio communication. Power is supplied through various SMPS units and distributed via terminal blocks and DC jacks. Data communication is facilitated by Beelink MINI S12 N95 computers, RS232 splitters, and a 1000BASE-T Media Converter for network connectivity. RF Directional Couplers are used to interface antennas with the USRP units, and the entire system is likely contained within cases for protection and organization.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pulsefex: A project utilizing w25qxx in a practical application
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of J26 CLOSEUP: A project utilizing w25qxx in a practical application
FTDI to UART Adapter with J26 Connector
This circuit connects an FTDI USB-to-serial converter to a standard serial interface via a J26 connector. It facilitates serial communication by linking the ground, transmit, receive, data terminal ready, and request to send signals between the FTDI chip and the J26 connector.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Embedded systems requiring non-volatile memory
  • Firmware and bootloader storage
  • Data logging in IoT devices
  • Consumer electronics, such as smart appliances
  • Automotive systems for configuration and calibration data

Technical Specifications

The W25QXX series offers a range of memory capacities and features. Below are the general technical specifications for the series:

Parameter Specification
Memory Capacity 512 Kbits to 128 Mbits
Interface SPI (Serial Peripheral Interface)
Operating Voltage 2.7V to 3.6V
Operating Temperature Range -40°C to +85°C
Clock Frequency Up to 104 MHz
Page Size 256 bytes
Sector Size 4 KB
Block Size 32 KB or 64 KB
Endurance 100,000 program/erase cycles
Data Retention 20 years

Pin Configuration

The W25QXX series typically comes in an 8-pin package. Below is the pinout and description:

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 flash to the host
3 WP# Write Protect (active low) - Protects certain 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 flash
6 CLK Clock - Synchronizes data transfer between the host and the flash
7 HOLD# Hold (active low) - Pauses communication without deselecting the device
8 VCC Power Supply - Connect to a 2.7V to 3.6V power source

Usage Instructions

Connecting the W25QXX to a Microcontroller

To use the W25QXX in a circuit, connect it to a microcontroller via the SPI interface. Below is an example of how to connect the W25QXX to an Arduino UNO:

W25QXX Pin Arduino UNO Pin
CS# Digital Pin 10
DO (MISO) Digital Pin 12
WP# Connect to VCC (disable write protection)
GND GND
DI (MOSI) Digital Pin 11
CLK Digital Pin 13
HOLD# Connect to VCC (disable hold function)
VCC 3.3V

Example Code for Arduino UNO

Below is an example Arduino sketch to read the device ID of the W25QXX:

#include <SPI.h>

// Define SPI pins for W25QXX
#define CS_PIN 10  // Chip Select pin

void setup() {
  Serial.begin(9600); // Initialize serial communication
  pinMode(CS_PIN, OUTPUT); // Set CS pin as output
  digitalWrite(CS_PIN, HIGH); // Set CS pin high (inactive)

  SPI.begin(); // Initialize SPI
  SPI.setClockDivider(SPI_CLOCK_DIV2); // Set SPI clock speed
  SPI.setDataMode(SPI_MODE0); // Set SPI mode
  SPI.setBitOrder(MSBFIRST); // Set bit order to MSB first

  Serial.println("Reading W25QXX Device ID...");
  uint32_t deviceID = readDeviceID();
  Serial.print("Device ID: 0x");
  Serial.println(deviceID, HEX);
}

void loop() {
  // Main loop does nothing
}

// Function to read the device ID
uint32_t readDeviceID() {
  digitalWrite(CS_PIN, LOW); // Select the W25QXX
  SPI.transfer(0x9F); // Send "Read ID" command

  // Read 3 bytes of device ID
  uint32_t id = 0;
  id |= SPI.transfer(0x00) << 16; // Read first byte
  id |= SPI.transfer(0x00) << 8;  // Read second byte
  id |= SPI.transfer(0x00);       // Read third byte

  digitalWrite(CS_PIN, HIGH); // Deselect the W25QXX
  return id;
}

Important Considerations

  1. Voltage Levels: Ensure the W25QXX operates within its specified voltage range (2.7V to 3.6V). Use a level shifter if your microcontroller operates at 5V logic.
  2. Write Protection: If write protection is not required, connect the WP# pin to VCC.
  3. Hold Function: If the hold function is not needed, connect the HOLD# pin to VCC.
  4. SPI Speed: Configure the SPI clock speed to match the W25QXX's maximum supported frequency (up to 104 MHz).

Troubleshooting and FAQs

Common Issues

  1. Device Not Responding

    • Cause: Incorrect SPI connections or configuration.
    • Solution: Double-check the wiring and ensure the SPI settings (mode, clock speed) match the W25QXX's requirements.
  2. Incorrect Data Read/Write

    • Cause: Voltage mismatch or noise on SPI lines.
    • Solution: Use proper decoupling capacitors near the VCC pin and ensure clean signal lines.
  3. Write Operations Failing

    • Cause: Write protection enabled.
    • Solution: Verify the WP# pin is connected to VCC to disable write protection.
  4. Device ID Returns 0xFFFFFF

    • Cause: CS# pin not properly toggled or SPI misconfiguration.
    • Solution: Ensure the CS# pin is toggled correctly and the SPI mode is set to MODE0.

FAQs

  1. Can I use the W25QXX with a 5V microcontroller?

    • Yes, but you must use a level shifter to convert the 5V logic to 3.3V.
  2. What is the difference between sectors and blocks?

    • Sectors are smaller memory regions (4 KB) used for erasing, while blocks are larger regions (32 KB or 64 KB) used for bulk operations.
  3. How do I erase the entire chip?

    • Use the "Chip Erase" command (0xC7) via SPI. Note that this operation can take several seconds.
  4. Is the W25QXX series suitable for high-speed data logging?

    • Yes, the W25QXX supports high-speed SPI communication, making it ideal for data logging applications.

By following this documentation, you can effectively integrate the W25QXX into your projects and troubleshoot common issues.