I’ve gone through several iterations of this driver, starting with a thin interface for the W25P16 around 10 or 12 years ago. I think I took out support for Micron multi-die parts, but I’ve got that around somewhere. The way it’s set up now it also requires cache.c, which implements a write-back cache that can drastically speed up file system access. spiflash.c is the main part, and there’s a FatFs interface in diskio.c. You’re welcome to use and adapt that one if it’s any use to you – there’s nothing sensitive there. I think I sent you one of my projects that has my SPI flash driver. Serial Flash driver by Paul Stoffregen:.The project is available on GitHub (see links below). In a next step I plan to use the memory with a file system, more about this in a future article. With the command line interface I can read/write the memory. The driver is still in an early stage, and I might update it to support other Flash devices too. I have now a working driver for using the Winbond W25Q128 16 MByte serial/SPI flash chip. The example is running on an ARM Cortex-M4 from NXP (Kinetis K20DX128), but easily can be ported for any other microcontroller. An Eclipse example project is available on GitHub (check the links at the end of this article). I have created a driver with a command line interface: that way I can read/write data of the SPI FLASH memory device. Using a FLASH chip might be the better solution. But it needs space on the PCB, the SD card socket needs to be accessible, the socket is a mechanical component and has its costs plus is not very reliable in an environment with vibrations and subject of corrosion. They are easily available, provide nearly ‘unlimited’ storage and with the FatFS file system I can easily exchange data with the host. Usually I use micro-SD cards for logging data. The device uses the following pins:Ī red LED on the breakout module indicates if the board is powered. Such SPI memory devices are very inexpensive: I ordered a few breakout modules with Winbond W25Q128 (16 MByte) from AliExpress for $1.50 each. With the addition of a small external device on the SPI bus I can easily add several MBytes of memory to the microcontroller. The typical usage of external SPI flash memory is using it to load or store data. Why not using an external SPI FLASH for a ‘normal’ microcontroller too? Winbond w25q128 Serial Flash Breakout Board
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |