Episode Details

Back to Episodes
EYE ON NPI - ISSI Serial NAND Flash Chips

EYE ON NPI - ISSI Serial NAND Flash Chips

Published 1 year ago
Description
This week's EYE ON NPI is a NAND in the HAND, it's ISSI Serial NAND Flash chips (https://www.digikey.com/en/product-highlight/i/issi/serial-nand-flash) available in a variety of sizes and footprints. These are great options for folks that need more data storage on their PCBs, but don't necessarily want an SD card. DigiKey has a selection of 1Gbit and 2Gbit chips, so you have tons of storage for data logs, images, recordings, or even filesystems. And the price is great, you'll pay much less per byte when buying NAND flash There's plenty of times you'll need to access non-volatile memory on your microcontroller: graphics or audio files for a user interface, maps or almanac data for telemetry, sensor or usage logs, interpreted code scripts, firmware updates, security certificates, etc. these files are too big to be stored in simple EEPROM chips (https://www.digikey.com/short/0rf9t7qb) that max out at a few kB. The next step up is to use NOR Flash (https://www.digikey.com/short/jfp3bvph) - you can get up to 256 Megabytes in size! (https://www.digikey.com/en/products/detail/issi-integrated-silicon-solution-inc/IS25LP02GJ-RHLE/24617385) Compared to EEPROM which comes in 1-Wire, I2C or SPI, you definitely have to use an SPI interface for NOR Flash. It's also possible on many chips to have 4-bit-at-a-time QSPI or even 8-bit OSPI interfacing for fast reads. And that's the thing that's really nice about NOR: instant reads of any byte anywhere in memory just like EEPROM. Unlike EEPROM you can't write just one byte at a time anywhere in the storage, you have to write 'page' and erase a 'sector' at a time - each page tends to be about 256 bytes, a sector is often 4KB. That means if you want to update a file, you'll need to read the whole 4K block into a memory cache, change the bytes you want to, then erase and re-write the block out. The good news though is once you write out a page, you can pretty much assume it will stay for many years: there's rarely corrupted data in NOR flash. And, although erasing and writing is a bit of a pain, the instant-access means NOR is great for 'XIP' or other dynamic memory access. If NOR is so great, why bother with NAND? One is cost: a 2MB NOR chip isn't too bad about 45 cents in quantity (https://www.digikey.com/short/zff49fb7) but once you get to the biggest 256 MB ones (https://www.digikey.com/short/vffmp583) the pricing gets high pretty quickly: $15 in tray quantities. Considering you can get a 64G SD card for that price, NOR isn't very cost effective. Second is sizing: if you want 1GB for large files, it just isn't available. For that kind of density you need NOR flash. NAND flash is the kind of flash you get when you buy a USB key or microSD card, although those have USB or SDIO interface chips (https://www.bunniestudios.com/blog/2013/where-usb-memory-sticks-are-born/) that are wire bonded to the NAND flash chips. You get a lot more for the price: instead of $15 for 256MB NOR, its $3 (https://www.digikey.com/short/r77p0922). You also don't need more pins! We always thought that NAND flash required a lot of pins since it comes in 48-TSSOP (https://www.digikey.com/short/8zqbmw31) but turns out that you can get it in a QSPI 8-pin format. That makes it easy to integrate without needing an 8-bit wide memory controller. However, the architectural decisions that give ISSI NAND (https://www.digikey.com/short/jtp8ppdb) the massive size & low cost that we love also make it more complex to use than NOR flash. For one, you can no longer get random access to any byte you like. Instead, an entire page must be read at once into a 2176-byte cache, and then can be accessed. This is fine for most uses except we can't use XIP anymore and there are probably some memory access use cases that don't work nearly as nicely. Also that high density means that bits are more likely to go 'bad' and flip. While you can sorta-kinda get away with not doing error correction or wear leveling on NOR, you absolutely must do error cor
Listen Now

Love PodBriefly?

If you like Podbriefly.com, please consider donating to support the ongoing development.

Support Us