![]() It is a simple VHDL design with no embedded component and hence I have no use. Hey, So I am working with Vivado 2014.4 and I am trying to program the SPI flash memory attached to the Artix XC7a35T so that the device can boot from the flash memory. */ #include #include #include #include #include #include #include #include #include #include #include #include /* Define max times to check status register before we give up. Artix XC7a35T Indirect programing of Winbond W25Q128FV SPI Flash. Compared to the w25m512jv, the jw has a different JEDEC ID. * * This code is free software you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. This chip is (nearly) identical to the Winbond w25m512jv which is already supported by Linux. * Copyright (C) 2014, Freescale Semiconductor, Inc. For example, NRF_QSPI_ERASE_LEN_64KB corresponds to opcode 0xd8, which on W25M02GW erases a 128KB block (64 pages x 2048 bytes per page).Īll of the above was verified by looking at the behavior of the QSPI peripheral using a logic analyser connected to the SPI bus./* * Based on m25p80.c, by Mike Lavender with * influence from lart.c (Abraham Van Der Merwe) and mtd_dataflash.c * * Copyright (C) 2005, Intec Automation Inc. Some of the driver documentation doesn't match what actually happens.Not that big a deal, as it's possible to issue the separate instruction using a custom command. The W25M02GW has a separate instruction to load a page from memory into buffer, and Fast Read and friends only read from the buffer. The QSPI peripheral appears to assume that the Fast Read and related instructions address all of memory.There are other issues too that are less critical: I suspect this means that the QSPI peripheral will not block correctly as it can't get the BUSY signal from the device. The Winbond chip expects an argument indicating one of three types of status registers being read. Status register reads sent by the QSPI peripheral consist of a single 0x05 opcode with no arguments.This causes the peripheral to ignore the first byte read back. The Winbond chip expects 24 bits of payload. The QSPI driver always seems to send 32 bits of payload with the Fast Read (0x0b) opcode, even with ADDRMODE_24BIT.The qspi driver seems to make a number of assumptions about the protocol that don't fit the Winbond W25M02GW (and certain other) SPI flash chips. Series supported include Atmel AT26DF, Spansion S25SL, SST 25VF, ST M25P, and Winbond W25X. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |