Difference between revisions of "W25Qxx"
(5 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
These [[EEPROM]] chips are typically named "x25qxxx" where the first x indicates the manufacturer ("W" indicates Winbond) and the xxx after the Q indicates the size (in Mbits). A "W25Q128" is therefore 128 Mbits = 16 mB [[EEPROM]] manufactured by Winbond. | These [[EEPROM]] chips are typically named "x25qxxx" where the first x indicates the manufacturer ("W" indicates Winbond) and the xxx after the Q indicates the size (in Mbits). A "W25Q128" is therefore 128 Mbits = 16 mB [[EEPROM]] manufactured by Winbond. | ||
+ | |||
+ | == NOR Flash == | ||
+ | |||
+ | The [[W25Qxx]] devices are so-called '''NOR Flash''' devices. Without going into details on how this works electrically from a usage point of view it means that in a fully erased device, all bits are set to 1. Programming simply flips certain bits from 1 to 0. | ||
== Connections == | == Connections == | ||
Line 15: | Line 19: | ||
== Memory Layout == | == Memory Layout == | ||
− | + | The memory in these devices are divided into blocks, sectors and pages. | |
+ | |||
+ | In the case of the W25Q128, each device is organized into 65536 pages of 256 byte each. Pages are grouped into sectors with each sector containing 16 pages giving a total of 4 kB. | ||
+ | |||
+ | === Blocks === | ||
+ | |||
+ | At the highest level is the "block". Blocks will typically be chunks of 64kB. In the case of the W25Q128 it will look like this: | ||
+ | |||
+ | [[File:W25Q128 Blocks.png|300px]] | ||
+ | |||
+ | A block can be "erased" by a single command. | ||
+ | |||
+ | === Sectors === | ||
+ | |||
+ | Each [[#Blocks|block]] is divided into a number of sectors. In the W25Q128 each sector contains 4kB: | ||
+ | |||
+ | [[File:W25Q128 Block Segmentation.png|300px]] | ||
+ | |||
+ | A sector can be erased by a single command and it is the smallest "unit" which can be erased. In other words, before writing any byte, the entire sector in which that byte resides will have to be erased. | ||
+ | |||
+ | === Pages === | ||
+ | |||
+ | A '''page''' is the largest area which can be programmed using one command. On the W25Q128 each page is 256 bytes meaning each sector contains 16 pages. | ||
== Miscellaneous Links == | == Miscellaneous Links == | ||
Line 21: | Line 47: | ||
* [[STM32 W25Qxx]] | * [[STM32 W25Qxx]] | ||
* [https://datasheet.lcsc.com/lcsc/1811142111_Winbond-Elec-W25Q128JVSIQ_C97521.pdf Winbond W25Q128 Datasheet] | * [https://datasheet.lcsc.com/lcsc/1811142111_Winbond-Elec-W25Q128JVSIQ_C97521.pdf Winbond W25Q128 Datasheet] | ||
+ | * [https://datasheet.lcsc.com/lcsc/1912111437_GigaDevice-Semicon-Beijing-GD25LQ64CSIGR_C395493.pdf Giga Device GD25LQ64C Datasheet] |
Latest revision as of 13:48, 22 March 2022
The W25Qxx is a common series of serial EEPROM chips.
Naming
These EEPROM chips are typically named "x25qxxx" where the first x indicates the manufacturer ("W" indicates Winbond) and the xxx after the Q indicates the size (in Mbits). A "W25Q128" is therefore 128 Mbits = 16 mB EEPROM manufactured by Winbond.
NOR Flash
The W25Qxx devices are so-called NOR Flash devices. Without going into details on how this works electrically from a usage point of view it means that in a fully erased device, all bits are set to 1. Programming simply flips certain bits from 1 to 0.
Connections
W25Qxx devices are available in a number of different packages, but the most common is a SOIC-8 package. These will typically have the following pinout:
It is worth noticing that many (if not all) of these devices can operate in two different "modes". Regular SPI with a MOSI/MISO pair of signals, and Quad-SPI where 4 data lines are being used.
Memory Layout
The memory in these devices are divided into blocks, sectors and pages.
In the case of the W25Q128, each device is organized into 65536 pages of 256 byte each. Pages are grouped into sectors with each sector containing 16 pages giving a total of 4 kB.
Blocks
At the highest level is the "block". Blocks will typically be chunks of 64kB. In the case of the W25Q128 it will look like this:
A block can be "erased" by a single command.
Sectors
Each block is divided into a number of sectors. In the W25Q128 each sector contains 4kB:
A sector can be erased by a single command and it is the smallest "unit" which can be erased. In other words, before writing any byte, the entire sector in which that byte resides will have to be erased.
Pages
A page is the largest area which can be programmed using one command. On the W25Q128 each page is 256 bytes meaning each sector contains 16 pages.