
Added initial support Xilinx Embedded Software. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
1398 lines
90 KiB
HTML
Executable file
1398 lines
90 KiB
HTML
Executable file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>2014.1_doc: xilisf.h File Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.5 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul></div>
|
|
<div class="nav">
|
|
<a class="el" href="dir_U_3A_2Fdoxygen_5Fpublish_2Fsources_2Fsw_5Fservices_2Fxilisf_5Fv4_5F0_2Fsrc_2Finclude_2F.html">include</a></div>
|
|
<h1>xilisf.h File Reference</h1><code>#include "xparameters.h"</code><br>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf.html">XIsf</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf___write_param.html">XIsf_WriteParam</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf___read_param.html">XIsf_ReadParam</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf___buffer_write_param.html">XIsf_BufferWriteParam</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf___buffer_to_flash_write_param.html">XIsf_BufferToFlashWriteParam</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf___flash_to_buf_transfer_param.html">XIsf_FlashToBufTransferParam</a></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_isf___buffer_read_param.html">XIsf_BufferReadParam</a></td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#1d0ee6c6f5a9e00989373645f45ad29f">ATMEL</a> 1</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#f9232ef48e81c8fa4eb9a0cafbe1f13d">INTEL</a> 2</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#0c2132b36166716de0d0220567fb911f">STM</a> 3</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#4c9979a36b3d283aff0f0ad16d778518">WINBOND</a> 4</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#91e4fd8bff363eba1fde517d161268f8">SPANSION</a> 5</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#23f7aea788f73df61e33a6d3653d66fa">SST</a> 6</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#f8aec62ca4dc5abf0ec026d942692c39">XISF_MANUFACTURER_ID_ATMEL</a> 0x1F</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#23560a22d8eda03c52cea571f1baee10">XISF_MANUFACTURER_ID_INTEL</a> 0x89</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#0e59ce2b73a1ddfdd4178195bd4cccc5">XISF_MANUFACTURER_ID_STM</a> 0x20</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#1b48d935bb4462e05f61d3fc5d9398b4">XISF_MANUFACTURER_ID_WINBOND</a> 0xEF</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#e1e3b662a80ebfe585f1625cc4fca8a8">XISF_MANUFACTURER_ID_SPANSION</a> 0x01</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#e559a10e7e0b535645c9f7211eccc679">XISF_MANUFACTURER_ID_SST</a> 0xBF</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f">XIsf_WriteOperation</a> { <br>
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f7ccc73aa14e6c91e6a4b844d3a4964e4">XISF_WRITE</a>,
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f65deafcdadb00de922014e7d16827a8a">XISF_AUTO_PAGE_WRITE</a>,
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f5dec37dd23332c00bb852a049ed52564">XISF_BUFFER_WRITE</a>,
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f2c7472cdc274cb348bb2d7cd033ccf9d">XISF_BUF_TO_PAGE_WRITE_WITH_ERASE</a>,
|
|
<br>
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9fdace5b80280ae4553d719e1f9a1a7b88">XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE</a>,
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f1460ff459ec0a37a2bf4414954bb314a">XISF_WRITE_STATUS_REG</a>,
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f2ba2c16dc5897eb9a845303efa1a47f2">XISF_OTP_WRITE</a>,
|
|
<a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9fa254c5d1376513b4dfbb0b0ced6212e1">XISF_WRITE_STATUS_REG2</a>
|
|
<br>
|
|
}</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32">XIsf_ReadOperation</a> { <br>
|
|
<a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d327d1c923b527a6a511b0837fe21f571d0">XISF_READ</a>,
|
|
<a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32c84e3eb392214110d47e6c7586d56c4f">XISF_FAST_READ</a>,
|
|
<a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32be5043a35bdcf97eb1bc71e9549346d7">XISF_PAGE_TO_BUF_TRANS</a>,
|
|
<a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d328cea4d4417a0e625c640fda4f5c95ff0">XISF_BUFFER_READ</a>,
|
|
<br>
|
|
<a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d3250a517dd499eeea1f68d4f6a82bcadba">XISF_FAST_BUFFER_READ</a>,
|
|
<a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32ce3ac0e6a4e71ebe9fcf4ba78cdeda40">XISF_OTP_READ</a>
|
|
<br>
|
|
}</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60">XIsf_EraseOperation</a> { <a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60f7d6092ce4434923b523308eb28bef69">XISF_PAGE_ERASE</a>,
|
|
<a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d6015bb193e095105e24acd7cbcf5403ffa">XISF_BLOCK_ERASE</a>,
|
|
<a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60f95379a4c5f070f203966f7d7e46ea1b">XISF_SECTOR_ERASE</a>,
|
|
<a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60c41edd422c187906da9cca049d272779">XISF_BULK_ERASE</a>
|
|
}</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50">XIsf_SpOperation</a> { <br>
|
|
<a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50bf518e49e073bcc60973edfb8759988c">XISF_SPR_READ</a>,
|
|
<a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50e88eed570c6d2bfa81153751fca0b74d">XISF_SPR_WRITE</a>,
|
|
<a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e5067294be91d925f37388d34c5387ca4e3">XISF_SPR_ERASE</a>,
|
|
<a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50489026530a7bc1db56ba8e926c3c35ac">XISF_SP_ENABLE</a>,
|
|
<br>
|
|
<a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50d4c0a70f0c23e8f1499b77d92098dc1a">XISF_SP_DISABLE</a>
|
|
<br>
|
|
}</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da">XIsf_IoctlOperation</a> { <a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da4d39fe6039e960e9a3025c5da4b275cb">XISF_IOCTL_RELEASE_DPD</a>,
|
|
<a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8daec55af43bc92dff93115a1d1ded3edc3">XISF_IOCTL_ENTER_DPD</a>,
|
|
<a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da25e0d47f7cfbb195d50e994ff91614ea">XISF_IOCTL_CLEAR_SR_FAIL_FLAGS</a>,
|
|
<a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da07504ab87211fb59bd649dd3bee49e54">XISF_IOCTL_ENABLE_HI_PERF_MODE</a>
|
|
}</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#a49172a16258a144cb357139b3c5ec9f">XIsf_Initialize</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, XIsf_Iface *SpiInstPtr, u8 SlaveSelect, u8 *WritePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#19cd8d1a3f3e3e806158e97eb4e38502">XIsf_GetStatus</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, u8 *ReadPtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#6f13ecf8a086def8aa00b670e8ba4ea2">XIsf_GetDeviceInfo</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, u8 *ReadPtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#ffd7e46280baaec6036a14b9c56d2c85">XIsf_Write</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, <a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f">XIsf_WriteOperation</a> Operation, void *OpParamPtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#99231feef694a25a16fdf248b925a230">XIsf_Read</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, <a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32">XIsf_ReadOperation</a> Operation, void *OpParamPtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#79488aca97af9bed4deb3fcc6a2d7bef">XIsf_Erase</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, <a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60">XIsf_EraseOperation</a> Operation, u32 Address)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#4174b1267c14caafc2b4626cbcca6759">XIsf_SectorProtect</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, <a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50">XIsf_SpOperation</a> Operation, u8 *BufferPtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#c32cffd6e6f79a5ac7272c07a44dbe6e">XIsf_Ioctl</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, <a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da">XIsf_IoctlOperation</a> Operation)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, u8 WriteEnable)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xilisf_8h.html#25b8b893226596531c19fe40f1a29cc7">XIsf_SetSpiConfiguration</a> (<a class="el" href="struct_x_isf.html">XIsf</a> *InstancePtr, XIsf_Iface *SpiInstPtr, u32 Options, u8 PreScaler)</td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
The Xilinx In-system and Serial Flash (XilIsf) Library supports the Xilinx In-system Flash and, external Serial Flash Memories from Atmel (AT45XXXD), Intel (S33), ST Microelectronics (STM) (M25PXX), Winbond (W25QXX/W25XX), Numonyx (N25QXX) devices. Intel (S33) and STM (M25PXX) Serial Flash devices are now a part of Serial Flash devices provided by Numonyx.<p>
|
|
<b>This library also supports the Spansion (S25FLXX) devices, but this family hasn't been tested. The support for this family of devices is limited to the common commands supported by the other flash families</b><p>
|
|
The following instructions are not supported in WinBond (W25QXX/W25XX) - Block Erase 32KB, Erase Suspend/Resume, Mode Bit Reset, Read Unique ID, and Read Manufacturer/Device ID.<p>
|
|
The following instructions are not supported in Numonyx (N25QXX)- Erase Suspend/Resume, Read/Write Volatile/Non-volatile configuration register.<p>
|
|
<b>Library Description</b><p>
|
|
The library enables higher layer software (e.g. an application) to communicate with the Serial Flash.<p>
|
|
The library allows the user to Write, Read and Erase the Serial Flash. The user can also protect the data stored in the Serial Flash from unwarranted modification by enabling the Sector Protection feature. User can also perform different Control operations on Intel, STM (Numonyx), Winbond and Spansion Serial Flash devices.<p>
|
|
The library supports interrupt driven mode and polled mode based on the mode in which the Spi driver is configured by the user.<p>
|
|
<ul>
|
|
<li>Polled Mode of operation: All the APIs are blocking in this mode.</li><li>Interrupt mode of operation: It is the application's responsibility to acknowledge the associated Interrupt Controller's interrupts. The transfer is initiated and the control is given back to the user application. The user application has to keep track of whether the initiated operation is completed successfully.</li></ul>
|
|
<p>
|
|
This library can support multiple instances of Serial Flash at a time, provided they are of the same device family (either Atmel, Intel, STM or Spansion) as the device family is selected at compile time.<p>
|
|
<b>Device Operation</b><p>
|
|
The Serial Flash operates as a slave device on the SPI bus, with Xilinx SPI core operating as the Master. The library uses XSpi driver for communicating with the Serial Flash.<p>
|
|
<b>Device Geometry</b><p>
|
|
<ul>
|
|
<li>Atmel (AT45XXXD)/Xilinx ISF: The Atmel Serial Flash is divided into Sectors. Each Sector consists of multiple Blocks. Each Block contains multiple Pages. Each Page contains multiple Bytes. The Number of Sectors, Blocks Per Sector, Pages Per Block and Bytes Per Page vary for different devices within this family. There are two addressing modes supported by the Atmel Serial Flash:<ul>
|
|
<li>Default-Addressing Mode.</li><li>Power-Of-2 Addressing mode.</li></ul>
|
|
</li></ul>
|
|
<p>
|
|
In Default Addressing mode the Atmel Serial Flash contains approximately 3% more Addressing memory than the Power-Of-2 addressing mode. The addressing mode of the Atmel Serial Flash can be known by reading the Device Status Register The ISF in the Xilinx devices is in Default-Addressing mode by default.<p>
|
|
The following Atmel flash memories are supported by this library. AT45DB011D AT45DB021D AT45DB041D AT45DB081D AT45DB161D AT45DB321D AT45DB642D<p>
|
|
<ul>
|
|
<li>Intel (Numonyx) (S33) and STM (Numonyx)(M25PXX): The Intel and STM Serial Flash is divided into Sectors. Each Sector consists of multiple pages. Each Page contains 256 Bytes. The Number of Sectors and Pages Per Sectors vary for different devices within this family.</li></ul>
|
|
<p>
|
|
The following Intel and STM flash memories are supported by this library. S3316MBIT S3332MBIT S3364MBIT<p>
|
|
M25P05_A M25P10_A M25P20 M25P40 M25P80 M25P16 M25P32 M25P64 M25P128<p>
|
|
<ul>
|
|
<li>Winbond W25QXX/W25XX: The Winbond W25QXX/W25XX Serial Flash is divided into Blocks of 64 KB and the blocks are divided into sectors. Each Sector consists of multiple pages. Each Page contains 256 Bytes. The Number of Blocks and Sectors vary for different devices within this family. The following instructions are not supported - Block Erase 32KB, Erase Suspend/Resume, Mode Bit Reset, Read Unique ID, and Read Manufacturer/Device ID.</li></ul>
|
|
<p>
|
|
The following Winbond flash memories are supported by this library. W25Q80 W25Q16 W25Q32 W25Q64 W25Q128 W25X10 W25X20 W25X40 W25X80 W25X16 W25X32 W25X64<p>
|
|
<ul>
|
|
<li>Numonyx N25QXX The Numonyx N25QXX Serial Flash is divided into sectors of 64 KB and the sectors are divided into sub-sectors. Each Sector consists of multiple pages. Each Page contains 256 Bytes. The Number of Blocks vary for different devices within this family. The following instructions are not supported - Erase Suspend/Resume, Read/Write Volatile/Non-volatile configuration register.</li></ul>
|
|
<p>
|
|
The following Numonyx flash memories are supported by this library. N25Q32 N25Q64 N25Q128<p>
|
|
<ul>
|
|
<li>Spansion S25FL The Spansion S25FL Serial Flash is divided into sectors of 64 KB and in devices like S25FL128/129, the sectors are divided into sub-sectors. Each Sector consists of multiple pages. Each Page contains 256 Bytes. The Number of Blocks vary for different devices within this family.</li></ul>
|
|
<p>
|
|
The following Spansion flash memories are supported by this library. S25FL004 S25FL008 S25FL016 S25FL032 S25FL064 S25FL128/129<p>
|
|
<ul>
|
|
<li>Silicon Storage Technology (SST) SST25WF080 The SST25WF080 Serial Flash is divided into sectors of 4KB. This flash doesn't support Page Write commands. Supports only Byte-Write Command.</li></ul>
|
|
<p>
|
|
Support for new parts can be easily added, when they are available from vendors.<p>
|
|
<b>Library Initialization</b><p>
|
|
The function call <a class="el" href="xilisf_8h.html#a49172a16258a144cb357139b3c5ec9f">XIsf_Initialize()</a> should be called by the application before using any other function in the library. This function will fetch the Manufacturer code and Device code and determine the geometry of the Serial Flash used.<p>
|
|
<b>Write Operations</b><p>
|
|
The <a class="el" href="xilisf_8h.html#ffd7e46280baaec6036a14b9c56d2c85">XIsf_Write()</a> API is used to write data to the Serial Flash. A maximum of a Page of data can be written using this API. Once the user initiates a write operation, the Serial Flash takes time to complete the write operation internally. The user has to read the Status Register (XIsf_GetStatus) to know if the Serial Flash is still busy with a previously initiated operation before initiating a new one.<p>
|
|
Using the <a class="el" href="xilisf_8h.html#ffd7e46280baaec6036a14b9c56d2c85">XIsf_Write()</a> API the user can perform several different types of write operations as mentioned below:<p>
|
|
<ul>
|
|
<li>Normal Write: Write data to the specified locations in the Serial Flash. This operation is supported in Atmel, Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Dual Input Fast Program: This operation is similar to the Normal Write operation, except that the data is transmitted on two lines (DQ0 and DQ1) instead of one. This operation is supported in Numonyx (N25QXX) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Dual Input Extended Fast Program: This operation is similar to the Dual Input Fast Program, except that the address is transmitted on two lines (DQ0 and DQ1) instead of one. This operation is supported in Numonyx (N25QXX) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Quad Input Fast Program: This operation is similar to the Dual Input Fast Program, except that the data is transmitted on four lines (DQ0 - DQ3) instead of two. This operation is supported in Numonyx (N25QXX), Winbond (W25QXX) and Spansion (S25FL129) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Quad Input Extended Fast Program: This operation is similar to the Quad Input Fast Program, except that the address is transmitted on four lines (DQ0 - DQ3) instead of one. This operation is supported in Numonyx (N25QXX) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Auto Page Write: Auto rewrite the contents of the page. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer Write: Write data to the internal SRAM buffer of the Serial Flash. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer To Memory Write With Erase: Write data from the specified SRAM buffer to a page in the Serial Flash after erasing the page. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer To Memory Write Without Erase: Write data from the specified SRAM buffer to a Page in the Serial Flash without erasing the page. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Write Status Register: Write to the Status Register of the Serial Flash. This operation is supported only for Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Write 2 byte Status Register: Write to the 16-bit Status Register of the Serial Flash. This operation is supported only for Winbond Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>One Time Programmable Area Write: Write one byte of data in to One Time Programmable area. This operation is supported only for Intel Serial Flash.</li></ul>
|
|
<p>
|
|
For Intel, STM (Numonyx), Winbond and Spansion Serial Flash devices, the user application must call the <a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable()</a> API by passing XISF_WRITE_ENABLE as an argument before calling the Isf_Write() API.<p>
|
|
<b>Read Operations</b><p>
|
|
The <a class="el" href="xilisf_8h.html#99231feef694a25a16fdf248b925a230">XIsf_Read()</a> API can be used to read a minimum of one byte and a maximum of an entire array of the Serial Flash depending on the type of read operation.<p>
|
|
Using the <a class="el" href="xilisf_8h.html#99231feef694a25a16fdf248b925a230">XIsf_Read()</a> API the user can perform several different types of read operations as mentioned below:<p>
|
|
<ul>
|
|
<li>Normal Read: Read data from the specified locations in the Serial Flash . This operation is supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Fast Read: Read a large block of contiguous data from the specified locations of the Serial Flash at a higher speed than the Normal Read. This operation is supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Dual Output Fast Read: This operation is similar to the Fast Read, except that the data is transmitted on two lines (DQ0 and DQ1) instead of one. This operation is supported in Numonyx (N25QXX), Winbond (W25QXX) and Spansion (S25FL129) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Dual Input/Output Fast Read: This operation is similar to the Dual Output Fast Read, except that the address is transmitted on two lines (DQ0 and DQ1) instead of one. This operation is supported in Numonyx (N25QXX), Winbond (W25QXX) and Spansion (S25FL129) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Quad Output Fast Read: This operation is similar to the Dual Output Fast Read, except that the data is transmitted on four lines (DQ0 - DQ3) instead of two. This operation is supported in Numonyx (N25QXX), Winbond (W25QXX) and Spansion (S25FL129) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Quad Input/Output Fast Read: This operation is similar to the Quad Output Fast Program, except that the address is transmitted on four lines (DQ0 - DQ3) instead of one. This operation is supported in Numonyx (N25QXX), Winbond (W25QXX) and Spansion (S25FL129) Quad Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Memory To Buffer Transfer: Transfer a page of data from the Serial Flash to the specified internal SRAM buffer of the Serial Flash. This operation is supported only in Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer Read: Read data from the specified SRAM internal buffer of the Serial Flash. This operation is supported only in Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Fast Buffer Read: Read multiple contiguous bytes from the internal SRAM page buffer of the Serial Flash at a higher speed than normal Buffer Read. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>One Time Programmable Area Read: Read One Time Programmable area. This operation is supported only for Intel Serial Flash.</li></ul>
|
|
<p>
|
|
<b>Erase Operations</b><p>
|
|
The <a class="el" href="xilisf_8h.html#79488aca97af9bed4deb3fcc6a2d7bef">XIsf_Erase()</a> API can be used to Erase the contents of the Serial Flash. Once the user initiates an Erase operation, the Serial Flash takes time to complete the Erase operation internally. The user has to read the Status Register to know if the Serial Flash is still busy with a previously initiated operation before initiating a new one.<p>
|
|
Using the <a class="el" href="xilisf_8h.html#79488aca97af9bed4deb3fcc6a2d7bef">XIsf_Erase()</a> API the user can perform four different types of Erase operations as mentioned below :<p>
|
|
<ul>
|
|
<li>Page Erase: Erase one Page of the Serial Flash. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Block Erase: Erase one Block of the Serial Flash. This operation is supported for Atmel, Intel, Winbond Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Sector Erase: Erase one Sector of the Serial Flash. This operation is supported for Atmel, Intel, STM, Spansion and Winbond Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Bulk Erase: Erase an entire Serial Flash. This operation is supported for Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
For Intel, STM, Winbond and Spansion Serial Flash the user application must call the <a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable()</a> API by passing XISF_WRITE_ENABLE as an argument before calling the <a class="el" href="xilisf_8h.html#79488aca97af9bed4deb3fcc6a2d7bef">XIsf_Erase()</a> API.<p>
|
|
<b>Sector Protection Operations</b><p>
|
|
The <a class="el" href="xilisf_8h.html#4174b1267c14caafc2b4626cbcca6759">XIsf_SectorProtect()</a> API can be used to perform Sector Protection related operations. The Serial Flash is divided into Sectors. Each Sector or number of Sectors can be protected from unwarranted writing/erasing.<p>
|
|
Using the <a class="el" href="xilisf_8h.html#4174b1267c14caafc2b4626cbcca6759">XIsf_SectorProtect()</a> API the user can perform five different type of operations as given below:<p>
|
|
<ul>
|
|
<li>Sector Protect Register Read: Read Sector Protect Register/Bits in to the buffer provided by user. This operation is supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Sector Protect Register Write: Write data to the Sector Protect Register/Bits. This operation is supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Sector Protect Register Erase: Erase the Sector Protect Register. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Sector Protect Enable: Enable Sector Protect mode of Serial Flash. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Sector Protect Disable: Disable Sector Protect mode of Serial Flash. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
For Intel, STM, Winbond and Spansion Serial Flash the user application must call the <a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable()</a> API by passing XISF_WRITE_ENABLE as an argument before calling the <a class="el" href="xilisf_8h.html#4174b1267c14caafc2b4626cbcca6759">XIsf_SectorProtect()</a> API for Sector Protect Register Write operation.<p>
|
|
<b>Device Control Operations</b><p>
|
|
The <a class="el" href="xilisf_8h.html#c32cffd6e6f79a5ac7272c07a44dbe6e">XIsf_Ioctl()</a> API can be used to perform control operations on the Intel, STM, Winbond and Spansion Serial Flash.<p>
|
|
Using the <a class="el" href="xilisf_8h.html#c32cffd6e6f79a5ac7272c07a44dbe6e">XIsf_Ioctl()</a> API the user can perform several different types of operations as given below:<p>
|
|
<ul>
|
|
<li>Release From Deep Power-Down Mode: This operation releases the Serial Flash from Deep Power-Down Mode. This operation is supported for Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Enter to Deep Power-Down Mode: This operation puts the Serial Flash in to Deep Power-Down Mode. In this mode all commands except the release from Deep Power-Down Mode command will be ignored. This operation is supported for Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Clear Status Register Fail Flag: This operation clears all the fail flags in the Status Register of the Serial Flash. This operation is only supported for Intel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>High Performance Mode: This instruction must be executed before the dual/quad I/O instructions in Winbond Flash. This instruction is supported only in Winbond (W25QXX) Serial Flash.</li></ul>
|
|
<p>
|
|
<b>Serial Flash Information Read</b><p>
|
|
<a class="el" href="xilisf_8h.html#6f13ecf8a086def8aa00b670e8ba4ea2">XIsf_GetDeviceInfo()</a> API is used to read the Joint Electron Device Engineering Council (JEDEC) compatible device information. This JEDEC information consists of Manufacturer ID, Vendor-Specific Device family identifier, Vendor-Specific device identifier for the specified family, number of bits stored per memory cell, product version and number of additional Extended Device Information bytes.<p>
|
|
Read the Spartan-3AN In-system Flash User Guide and the data sheets of Atmel-AT45XXXD/STM-M25PXX/Intel-S33/Winbond-W25QXX/W25XX/Spansion-S25FLXX for more information.<p>
|
|
<a class="el" href="xilisf_8h.html#19cd8d1a3f3e3e806158e97eb4e38502">XIsf_GetStatus()</a> API is used to read the Status Register of the Serial Flash. Winbond devices have a Status Register 2 which can be read using the XIsf_GetStatusReg2() API.<p>
|
|
<b>Write Enable/Disable Operations</b><p>
|
|
For Intel, STM, Winbond and Spansion Serial Flash the user application must enable the Write to the Serial Flash by calling XIsf_WriteEnable (XISF_WRITE_ENABLE) API before doing any Write operations to the Serial Flash. Writing to the Serial Flash is disabled by calling XIsf_WriteEnable (XISF_WRITE_DISABLE) API.<p>
|
|
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
|
|
This library is intended to be RTOS and processor independent. It works with physical addresses only. Any needs for dynamic memory management, threads, mutual exclusion, virtual memory or cache control must be satisfied by the layer above this driver.<p>
|
|
This library supports the Spansion (S25FLXX) devices, but this family hasn't been tested. The support for this family of devices is limited to the common commands supported by the other flash families.<p>
|
|
<pre></pre><p>
|
|
<pre> MODIFICATION HISTORY:</pre><p>
|
|
<pre> Ver Who Date Changes
|
|
----- ------- -------- -----------------------------------------------
|
|
1.00a ksu/sdm 03/03/08 First release
|
|
2.00a ktn 11/27/09 Updated to use HAL processor APIs/definitions
|
|
2.01a sdm 01/04/10 Added Support for Winbond W25Q80/16/32 devices
|
|
2.01a sdm 06/17/10 Updated the Tcl to support axi_spi
|
|
2.03a sdm 04/17/10 Updated to support Winbond memory W25Q128 and added
|
|
a list of supported flash memories
|
|
Updated the Tcl to support axi_quad_spi
|
|
2.04a sdm 08/17/10 Updated to support Numonyx (N25QXX) and Spansion
|
|
flash memories
|
|
3.00a srt 06/20/12 Updated to support interfaces SPI PS and QSPI PS.
|
|
New API:
|
|
XIsf_RegisterInterface()
|
|
<a class="el" href="xilisf_8h.html#25b8b893226596531c19fe40f1a29cc7">XIsf_SetSpiConfiguration()</a>
|
|
XIsf_SetOperatingMode()
|
|
Changed API:
|
|
<a class="el" href="xilisf_8h.html#a49172a16258a144cb357139b3c5ec9f">XIsf_Initialize()</a>
|
|
XIsf_Transfer()
|
|
Added support to SST flash.
|
|
3.01a srt 02/06/13 Updated for changes made in QSPIPS driver (CR 698107).
|
|
APIs changed:
|
|
XQspiPs_PolledTransfer()
|
|
XQspiPs_Transfer()
|
|
XQspiPs_SetSlaveSelect().
|
|
Modified the examples xilisf_spips_sst_intr_example.c
|
|
and xilisf_spips_sst_polled_example.c to correct
|
|
the flash write, erase and read logic. (CR 703816)
|
|
3.02a srt 04/25/13 - Added Bulk Erase command support for SST and
|
|
Spansion flashes (CR 703816 & 711003).<ul>
|
|
<li>Modified SECTOR and BLOCK Erase commands for
|
|
SST flash and updated spips examples.
|
|
(CR 703816)</li><li>Updated spips and qspips examples to perform
|
|
Write enable operation in each sector</li><li>Removed compiler errors when not selecting proper
|
|
interface for Zynq. (CR 716451)</li></ul>
|
|
</pre><p>
|
|
<pre> </pre> <hr><h2>Define Documentation</h2>
|
|
<a class="anchor" name="1d0ee6c6f5a9e00989373645f45ad29f"></a><!-- doxytag: member="xilisf.h::ATMEL" ref="1d0ee6c6f5a9e00989373645f45ad29f" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define ATMEL 1 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions specify the type of Serial Flash family. Based on the Serial Flash family selected, some part of the code is included or excluded in the In-system and Serial Flash Library. Atmel family device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="f9232ef48e81c8fa4eb9a0cafbe1f13d"></a><!-- doxytag: member="xilisf.h::INTEL" ref="f9232ef48e81c8fa4eb9a0cafbe1f13d" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define INTEL 2 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Intel family device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="91e4fd8bff363eba1fde517d161268f8"></a><!-- doxytag: member="xilisf.h::SPANSION" ref="91e4fd8bff363eba1fde517d161268f8" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define SPANSION 5 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Spansion family device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="23f7aea788f73df61e33a6d3653d66fa"></a><!-- doxytag: member="xilisf.h::SST" ref="23f7aea788f73df61e33a6d3653d66fa" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define SST 6 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
SST family device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="0c2132b36166716de0d0220567fb911f"></a><!-- doxytag: member="xilisf.h::STM" ref="0c2132b36166716de0d0220567fb911f" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define STM 3 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
STM family device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="4c9979a36b3d283aff0f0ad16d778518"></a><!-- doxytag: member="xilisf.h::WINBOND" ref="4c9979a36b3d283aff0f0ad16d778518" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define WINBOND 4 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Winbond family device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="f8aec62ca4dc5abf0ec026d942692c39"></a><!-- doxytag: member="xilisf.h::XISF_MANUFACTURER_ID_ATMEL" ref="f8aec62ca4dc5abf0ec026d942692c39" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define XISF_MANUFACTURER_ID_ATMEL 0x1F </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions specify the Manufacturer Code for the different families of Serial Flash supported by this library. Atmel device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="23560a22d8eda03c52cea571f1baee10"></a><!-- doxytag: member="xilisf.h::XISF_MANUFACTURER_ID_INTEL" ref="23560a22d8eda03c52cea571f1baee10" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define XISF_MANUFACTURER_ID_INTEL 0x89 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Intel device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="e1e3b662a80ebfe585f1625cc4fca8a8"></a><!-- doxytag: member="xilisf.h::XISF_MANUFACTURER_ID_SPANSION" ref="e1e3b662a80ebfe585f1625cc4fca8a8" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define XISF_MANUFACTURER_ID_SPANSION 0x01 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Spansion device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="e559a10e7e0b535645c9f7211eccc679"></a><!-- doxytag: member="xilisf.h::XISF_MANUFACTURER_ID_SST" ref="e559a10e7e0b535645c9f7211eccc679" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define XISF_MANUFACTURER_ID_SST 0xBF </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
SST device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="0e59ce2b73a1ddfdd4178195bd4cccc5"></a><!-- doxytag: member="xilisf.h::XISF_MANUFACTURER_ID_STM" ref="0e59ce2b73a1ddfdd4178195bd4cccc5" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define XISF_MANUFACTURER_ID_STM 0x20 </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
STM device </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="1b48d935bb4462e05f61d3fc5d9398b4"></a><!-- doxytag: member="xilisf.h::XISF_MANUFACTURER_ID_WINBOND" ref="1b48d935bb4462e05f61d3fc5d9398b4" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">#define XISF_MANUFACTURER_ID_WINBOND 0xEF </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Winbond device </td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Enumeration Type Documentation</h2>
|
|
<a class="anchor" name="d40da729d79447497797257daf106d60"></a><!-- doxytag: member="xilisf.h::XIsf_EraseOperation" ref="d40da729d79447497797257daf106d60" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">enum <a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60">XIsf_EraseOperation</a> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions determines the type of Erase operation to be performed on the Serial Flash. <dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="d40da729d79447497797257daf106d60f7d6092ce4434923b523308eb28bef69"></a><!-- doxytag: member="XISF_PAGE_ERASE" ref="d40da729d79447497797257daf106d60f7d6092ce4434923b523308eb28bef69" args="" -->XISF_PAGE_ERASE</em> </td><td>
|
|
Page Erase operation </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="d40da729d79447497797257daf106d6015bb193e095105e24acd7cbcf5403ffa"></a><!-- doxytag: member="XISF_BLOCK_ERASE" ref="d40da729d79447497797257daf106d6015bb193e095105e24acd7cbcf5403ffa" args="" -->XISF_BLOCK_ERASE</em> </td><td>
|
|
Block Erase operation </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="d40da729d79447497797257daf106d60f95379a4c5f070f203966f7d7e46ea1b"></a><!-- doxytag: member="XISF_SECTOR_ERASE" ref="d40da729d79447497797257daf106d60f95379a4c5f070f203966f7d7e46ea1b" args="" -->XISF_SECTOR_ERASE</em> </td><td>
|
|
Sector Erase operation </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="d40da729d79447497797257daf106d60c41edd422c187906da9cca049d272779"></a><!-- doxytag: member="XISF_BULK_ERASE" ref="d40da729d79447497797257daf106d60c41edd422c187906da9cca049d272779" args="" -->XISF_BULK_ERASE</em> </td><td>
|
|
Erase an entire Flash </td></tr>
|
|
</table>
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="7ac002cffd0bf0af01a2755fa362f8da"></a><!-- doxytag: member="xilisf.h::XIsf_IoctlOperation" ref="7ac002cffd0bf0af01a2755fa362f8da" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">enum <a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da">XIsf_IoctlOperation</a> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions determines the type of control operations to be performed on the Serial Flash. <dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="7ac002cffd0bf0af01a2755fa362f8da4d39fe6039e960e9a3025c5da4b275cb"></a><!-- doxytag: member="XISF_IOCTL_RELEASE_DPD" ref="7ac002cffd0bf0af01a2755fa362f8da4d39fe6039e960e9a3025c5da4b275cb" args="" -->XISF_IOCTL_RELEASE_DPD</em> </td><td>
|
|
Release from Deep Power-down </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="7ac002cffd0bf0af01a2755fa362f8daec55af43bc92dff93115a1d1ded3edc3"></a><!-- doxytag: member="XISF_IOCTL_ENTER_DPD" ref="7ac002cffd0bf0af01a2755fa362f8daec55af43bc92dff93115a1d1ded3edc3" args="" -->XISF_IOCTL_ENTER_DPD</em> </td><td>
|
|
Enter in to Deep Power-down mode </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="7ac002cffd0bf0af01a2755fa362f8da25e0d47f7cfbb195d50e994ff91614ea"></a><!-- doxytag: member="XISF_IOCTL_CLEAR_SR_FAIL_FLAGS" ref="7ac002cffd0bf0af01a2755fa362f8da25e0d47f7cfbb195d50e994ff91614ea" args="" -->XISF_IOCTL_CLEAR_SR_FAIL_FLAGS</em> </td><td>
|
|
Clear Status Register Fail Flags </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="7ac002cffd0bf0af01a2755fa362f8da07504ab87211fb59bd649dd3bee49e54"></a><!-- doxytag: member="XISF_IOCTL_ENABLE_HI_PERF_MODE" ref="7ac002cffd0bf0af01a2755fa362f8da07504ab87211fb59bd649dd3bee49e54" args="" -->XISF_IOCTL_ENABLE_HI_PERF_MODE</em> </td><td>
|
|
Enable high performance mode (availabe in Winbond quad flash (W25Q)) </td></tr>
|
|
</table>
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="0bd432e4c70e55cca0324753ecf73d32"></a><!-- doxytag: member="xilisf.h::XIsf_ReadOperation" ref="0bd432e4c70e55cca0324753ecf73d32" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">enum <a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32">XIsf_ReadOperation</a> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions determines the type of Read operations to be performed on the Serial Flash. <dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="0bd432e4c70e55cca0324753ecf73d327d1c923b527a6a511b0837fe21f571d0"></a><!-- doxytag: member="XISF_READ" ref="0bd432e4c70e55cca0324753ecf73d327d1c923b527a6a511b0837fe21f571d0" args="" -->XISF_READ</em> </td><td>
|
|
Normal Read operation </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="0bd432e4c70e55cca0324753ecf73d32c84e3eb392214110d47e6c7586d56c4f"></a><!-- doxytag: member="XISF_FAST_READ" ref="0bd432e4c70e55cca0324753ecf73d32c84e3eb392214110d47e6c7586d56c4f" args="" -->XISF_FAST_READ</em> </td><td>
|
|
Fast Read operation </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="0bd432e4c70e55cca0324753ecf73d32be5043a35bdcf97eb1bc71e9549346d7"></a><!-- doxytag: member="XISF_PAGE_TO_BUF_TRANS" ref="0bd432e4c70e55cca0324753ecf73d32be5043a35bdcf97eb1bc71e9549346d7" args="" -->XISF_PAGE_TO_BUF_TRANS</em> </td><td>
|
|
Transfer data from Flash memory to internal SRAM buffer of Flash </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="0bd432e4c70e55cca0324753ecf73d328cea4d4417a0e625c640fda4f5c95ff0"></a><!-- doxytag: member="XISF_BUFFER_READ" ref="0bd432e4c70e55cca0324753ecf73d328cea4d4417a0e625c640fda4f5c95ff0" args="" -->XISF_BUFFER_READ</em> </td><td>
|
|
Read data from SRAM internal buffer of the Flash </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="0bd432e4c70e55cca0324753ecf73d3250a517dd499eeea1f68d4f6a82bcadba"></a><!-- doxytag: member="XISF_FAST_BUFFER_READ" ref="0bd432e4c70e55cca0324753ecf73d3250a517dd499eeea1f68d4f6a82bcadba" args="" -->XISF_FAST_BUFFER_READ</em> </td><td>
|
|
Fast SRAM buffer read operation on Flash </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="0bd432e4c70e55cca0324753ecf73d32ce3ac0e6a4e71ebe9fcf4ba78cdeda40"></a><!-- doxytag: member="XISF_OTP_READ" ref="0bd432e4c70e55cca0324753ecf73d32ce3ac0e6a4e71ebe9fcf4ba78cdeda40" args="" -->XISF_OTP_READ</em> </td><td>
|
|
Read One Time Programmable area </td></tr>
|
|
</table>
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="9b4085aba9552af9b456b6aa0cc91e50"></a><!-- doxytag: member="xilisf.h::XIsf_SpOperation" ref="9b4085aba9552af9b456b6aa0cc91e50" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">enum <a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50">XIsf_SpOperation</a> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions determines the type of Sector protection operations to be performed on the Serial Flash. <dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="9b4085aba9552af9b456b6aa0cc91e50bf518e49e073bcc60973edfb8759988c"></a><!-- doxytag: member="XISF_SPR_READ" ref="9b4085aba9552af9b456b6aa0cc91e50bf518e49e073bcc60973edfb8759988c" args="" -->XISF_SPR_READ</em> </td><td>
|
|
Sector protect register read </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="9b4085aba9552af9b456b6aa0cc91e50e88eed570c6d2bfa81153751fca0b74d"></a><!-- doxytag: member="XISF_SPR_WRITE" ref="9b4085aba9552af9b456b6aa0cc91e50e88eed570c6d2bfa81153751fca0b74d" args="" -->XISF_SPR_WRITE</em> </td><td>
|
|
Sector protect register write </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="9b4085aba9552af9b456b6aa0cc91e5067294be91d925f37388d34c5387ca4e3"></a><!-- doxytag: member="XISF_SPR_ERASE" ref="9b4085aba9552af9b456b6aa0cc91e5067294be91d925f37388d34c5387ca4e3" args="" -->XISF_SPR_ERASE</em> </td><td>
|
|
Sector protect register erase </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="9b4085aba9552af9b456b6aa0cc91e50489026530a7bc1db56ba8e926c3c35ac"></a><!-- doxytag: member="XISF_SP_ENABLE" ref="9b4085aba9552af9b456b6aa0cc91e50489026530a7bc1db56ba8e926c3c35ac" args="" -->XISF_SP_ENABLE</em> </td><td>
|
|
Sector protect enable </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="9b4085aba9552af9b456b6aa0cc91e50d4c0a70f0c23e8f1499b77d92098dc1a"></a><!-- doxytag: member="XISF_SP_DISABLE" ref="9b4085aba9552af9b456b6aa0cc91e50d4c0a70f0c23e8f1499b77d92098dc1a" args="" -->XISF_SP_DISABLE</em> </td><td>
|
|
Sector protect disable </td></tr>
|
|
</table>
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f"></a><!-- doxytag: member="xilisf.h::XIsf_WriteOperation" ref="807b0746a7fb7574beee1c11fdc9bb9f" args="" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">enum <a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f">XIsf_WriteOperation</a> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The following definitions determines the type of Write operation to be performed on the Serial Flash. <dl compact><dt><b>Enumerator: </b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f7ccc73aa14e6c91e6a4b844d3a4964e4"></a><!-- doxytag: member="XISF_WRITE" ref="807b0746a7fb7574beee1c11fdc9bb9f7ccc73aa14e6c91e6a4b844d3a4964e4" args="" -->XISF_WRITE</em> </td><td>
|
|
Normal write operation </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f65deafcdadb00de922014e7d16827a8a"></a><!-- doxytag: member="XISF_AUTO_PAGE_WRITE" ref="807b0746a7fb7574beee1c11fdc9bb9f65deafcdadb00de922014e7d16827a8a" args="" -->XISF_AUTO_PAGE_WRITE</em> </td><td>
|
|
Auto rewrite the contents of the page </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f5dec37dd23332c00bb852a049ed52564"></a><!-- doxytag: member="XISF_BUFFER_WRITE" ref="807b0746a7fb7574beee1c11fdc9bb9f5dec37dd23332c00bb852a049ed52564" args="" -->XISF_BUFFER_WRITE</em> </td><td>
|
|
Write data to the internal SRAM buffer of the Flash </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f2c7472cdc274cb348bb2d7cd033ccf9d"></a><!-- doxytag: member="XISF_BUF_TO_PAGE_WRITE_WITH_ERASE" ref="807b0746a7fb7574beee1c11fdc9bb9f2c7472cdc274cb348bb2d7cd033ccf9d" args="" -->XISF_BUF_TO_PAGE_WRITE_WITH_ERASE</em> </td><td>
|
|
Erase the specified Page then Write data to Flash from the internal SRAM buffer </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9fdace5b80280ae4553d719e1f9a1a7b88"></a><!-- doxytag: member="XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE" ref="807b0746a7fb7574beee1c11fdc9bb9fdace5b80280ae4553d719e1f9a1a7b88" args="" -->XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE</em> </td><td>
|
|
Write data to the Flash from the internal SRAM buffer </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f1460ff459ec0a37a2bf4414954bb314a"></a><!-- doxytag: member="XISF_WRITE_STATUS_REG" ref="807b0746a7fb7574beee1c11fdc9bb9f1460ff459ec0a37a2bf4414954bb314a" args="" -->XISF_WRITE_STATUS_REG</em> </td><td>
|
|
Write to the Status Register </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9f2ba2c16dc5897eb9a845303efa1a47f2"></a><!-- doxytag: member="XISF_OTP_WRITE" ref="807b0746a7fb7574beee1c11fdc9bb9f2ba2c16dc5897eb9a845303efa1a47f2" args="" -->XISF_OTP_WRITE</em> </td><td>
|
|
Write one byte of data in to the One Time Programmable area </td></tr>
|
|
<tr><td valign="top"><em><a class="anchor" name="807b0746a7fb7574beee1c11fdc9bb9fa254c5d1376513b4dfbb0b0ced6212e1"></a><!-- doxytag: member="XISF_WRITE_STATUS_REG2" ref="807b0746a7fb7574beee1c11fdc9bb9fa254c5d1376513b4dfbb0b0ced6212e1" args="" -->XISF_WRITE_STATUS_REG2</em> </td><td>
|
|
Write to the 2 byte Status Register in W25QXX flash </td></tr>
|
|
</table>
|
|
</dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Function Documentation</h2>
|
|
<a class="anchor" name="79488aca97af9bed4deb3fcc6a2d7bef"></a><!-- doxytag: member="xilisf.h::XIsf_Erase" ref="79488aca97af9bed4deb3fcc6a2d7bef" args="(XIsf *InstancePtr, XIsf_EraseOperation Operation, u32 Address)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_Erase </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="xilisf_8h.html#d40da729d79447497797257daf106d60">XIsf_EraseOperation</a> </td>
|
|
<td class="mdname" nowrap> <em>Operation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>Address</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API erases the contents of the specified memory in the Serial Flash.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Operation</em> </td><td>is the type of Erase operation to be performed on the Serial Flash. The different operations are<ul>
|
|
<li>XISF_PAGE_ERASE: Page Erase</li><li>XISF_BLOCK_ERASE: Block Erase</li><li>XISF_SECTOR_ERASE: Sector Erase</li><li>XISF_BULK_ERASE: Bulk Erase </li></ul>
|
|
</td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Address</em> </td><td>is the address of the Page/Block/Sector to be erased. The address can be either Page address, Block address or Sector address based on the Erase operation to be performed.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd><ul>
|
|
<li>The erased bytes will read as 0xFF.</li><li>For Intel, STM, Winbond or Spansion Serial Flash the user application must call <a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable()</a> API by passing XISF_WRITE_ENABLE as an argument before calling the <a class="el" href="xilisf_8h.html#79488aca97af9bed4deb3fcc6a2d7bef">XIsf_Erase()</a> API.</li><li>Atmel Serial Flash support Page/Block/Sector Erase operations.</li><li>Intel, Winbond, Numonyx (N25QXX) and Spansion Serial Flash support Sector/Block/Bulk Erase operations.</li><li>STM (M25PXX) Serial Flash support Sector/Bulk Erase operations. </li></ul>
|
|
</dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="6f13ecf8a086def8aa00b670e8ba4ea2"></a><!-- doxytag: member="xilisf.h::XIsf_GetDeviceInfo" ref="6f13ecf8a086def8aa00b670e8ba4ea2" args="(XIsf *InstancePtr, u8 *ReadPtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_GetDeviceInfo </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 * </td>
|
|
<td class="mdname" nowrap> <em>ReadPtr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API reads the Joint Electron Device Engineering Council (JEDEC) information of the Serial Flash.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ReadPtr</em> </td><td>is a pointer to the buffer where the Device information is copied.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The Device information is stored at the second byte pointed by the ReadPtr. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="19cd8d1a3f3e3e806158e97eb4e38502"></a><!-- doxytag: member="xilisf.h::XIsf_GetStatus" ref="19cd8d1a3f3e3e806158e97eb4e38502" args="(XIsf *InstancePtr, u8 *ReadPtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_GetStatus </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 * </td>
|
|
<td class="mdname" nowrap> <em>ReadPtr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API reads the Serial Flash Status Register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ReadPtr</em> </td><td>is a pointer to the memory where the Status Register content is copied.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The contents of the Status Register is stored at the second byte pointed by the ReadPtr. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a49172a16258a144cb357139b3c5ec9f"></a><!-- doxytag: member="xilisf.h::XIsf_Initialize" ref="a49172a16258a144cb357139b3c5ec9f" args="(XIsf *InstancePtr, XIsf_Iface *SpiInstPtr, u8 SlaveSelect, u8 *WritePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_Initialize </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>XIsf_Iface * </td>
|
|
<td class="mdname" nowrap> <em>SpiInstPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 </td>
|
|
<td class="mdname" nowrap> <em>SlaveSelect</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 * </td>
|
|
<td class="mdname" nowrap> <em>WritePtr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
The geometry of the underlying Serial Flash is determined by reading the Joint Electron Device Engineering Council (JEDEC) Device Information and the Status Register of the Serial Flash. This API when called initializes the SPI interface with default settings. With custom settings, user should call <a class="el" href="xilisf_8h.html#25b8b893226596531c19fe40f1a29cc7">XIsf_SetSpiConfiguration()</a> and then call this API.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>SpiInstPtr</em> </td><td>is a pointer to the XIsf_Iface instance to be worked on. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>SlaveSelect</em> </td><td>is a 32-bit mask with a 1 in the bit position of the slave being selected. Only one slave can be selected at a time. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>WritePtr</em> </td><td>is a pointer to the buffer allocated by the user to be used by the In-system and Serial Flash Library to perform any read/write operations on the Serial Flash device. User applications must pass the address of this buffer for the Library to work.<ul>
|
|
<li>Write operations :<ul>
|
|
<li>The size of this buffer should be equal to the Number of bytes to be written to the Serial Flash + XISF_CMD_MAX_EXTRA_BYTES.</li><li>The size of this buffer should be large enough for usage across all the applications that use a common instance of the Serial Flash.</li><li>A minimum of one byte and a maximum of ISF_PAGE_SIZE bytes can be written to the Serial Flash, through a single Write operation.</li></ul>
|
|
</li><li>Read operations :<ul>
|
|
<li>The size of this buffer should be equal to XISF_CMD_MAX_EXTRA_BYTES, if the application only reads from the Serial Flash (no write operations).</li></ul>
|
|
</li></ul>
|
|
</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>- XST_SUCCESS if successful.<ul>
|
|
<li>XST_DEVICE_IS_STOPPED if the device must be started before transferring data.</li><li>XST_FAILURE, otherwise.</li></ul>
|
|
</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>- The <a class="el" href="xilisf_8h.html#a49172a16258a144cb357139b3c5ec9f">XIsf_Initialize()</a> API is a blocking call (for both polled and interrupt modes of the Spi driver). It reads the JEDEC information of the device and waits till the transfer is complete before checking if the information is valid.<ul>
|
|
<li>This library can support multiple instances of Serial Flash at a time, provided they are of the same device family (either Atmel, Intel or STM, Winbond or Spansion) as the device family is selected at compile time. </li></ul>
|
|
</dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="c32cffd6e6f79a5ac7272c07a44dbe6e"></a><!-- doxytag: member="xilisf.h::XIsf_Ioctl" ref="c32cffd6e6f79a5ac7272c07a44dbe6e" args="(XIsf *InstancePtr, XIsf_IoctlOperation Operation)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_Ioctl </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="xilisf_8h.html#7ac002cffd0bf0af01a2755fa362f8da">XIsf_IoctlOperation</a> </td>
|
|
<td class="mdname" nowrap> <em>Operation</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API configures and controls the Intel, STM, Winbond and Spansion Serial Flash.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Operation</em> </td><td>is the type of Control operation to be performed on the Serial Flash. The different control operations are<ul>
|
|
<li>XISF_RELEASE_DPD: Release from Deep Power Down (DPD) Mode</li><li>XISF_ENTER_DPD: Enter DPD Mode</li><li>XISF_CLEAR_SR_FAIL_FLAGS: Clear the Status Register Fail Flags</li></ul>
|
|
</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd><ul>
|
|
<li>Atmel Serial Flash does not support any of these operations.</li><li>Intel Serial Flash support Enter/Release from DPD Mode and Clear Status Register Fail Flags.</li><li>STM, Winbond and Spansion Serial Flash support Enter/Release from DPD Mode.</li><li>Winbond (W25QXX) Serial Flash support Enable High Performance mode. </li></ul>
|
|
</dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="99231feef694a25a16fdf248b925a230"></a><!-- doxytag: member="xilisf.h::XIsf_Read" ref="99231feef694a25a16fdf248b925a230" args="(XIsf *InstancePtr, XIsf_ReadOperation Operation, void *OpParamPtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_Read </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="xilisf_8h.html#0bd432e4c70e55cca0324753ecf73d32">XIsf_ReadOperation</a> </td>
|
|
<td class="mdname" nowrap> <em>Operation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>void * </td>
|
|
<td class="mdname" nowrap> <em>OpParamPtr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API reads the data from the Serial Flash.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Operation</em> </td><td>is the type of the read operation to be performed on the Serial Flash. The different operations are<ul>
|
|
<li>XISF_READ: Normal Read</li><li>XISF_FAST_READ: Fast Read</li><li>XISF_PAGE_TO_BUF_TRANS: Page to Buffer Transfer</li><li>XISF_BUFFER_READ: Buffer Read</li><li>XISF_FAST_BUFFER_READ: Fast Buffer Read</li><li>XISF_OTP_READ: One Time Programmable Area (OTP) Read</li><li>XISF_DUAL_OP_FAST_READ: Dual Output Fast Read</li><li>XISF_DUAL_IO_FAST_READ: Dual Input/Output Fast Read</li><li>XISF_QUAD_OP_FAST_READ: Quad Output Fast Read</li><li>XISF_QUAD_IO_FAST_READ: Quad Input/Output Fast Read </li></ul>
|
|
</td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>OpParamPtr</em> </td><td>is the pointer to structure variable which contains operational parameter of specified Operation. This parameter type is dependant on the type of Operation to be performed.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<ul>
|
|
<li>Normal Read (XISF_READ), Fast Read (XISF_FAST_READ), One Time Programmable Area Read(XISF_OTP_READ), Dual Output Fast Read (XISF_CMD_DUAL_OP_FAST_READ), Dual Input/Output Fast Read (XISF_CMD_DUAL_IO_FAST_READ), Quad Output Fast Read (XISF_CMD_QUAD_OP_FAST_READ) and Quad Input/Output Fast Read (XISF_CMD_QUAD_IO_FAST_READ): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___read_param.html">XIsf_ReadParam</a>. OpParamPtr->Address is start address in the Serial Flash. OpParamPtr->ReadPtr is a pointer to the memory where the data read from the Serial Flash is stored. OpParamPtr->NumBytes is number of bytes to read. OpParamPtr->NumDummyBytes is the number of dummy bytes to be transmitted for the Read command. This parameter is only used in case of Dual and Quad reads. Normal Read and Fast Read operations are supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash. Dual and quad reads are supported for Winbond (W25QXX), Numonyx (N25QXX) and Spansion (S25FL129) quad flash. OTP Read operation is only supported in Intel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Page To Buffer Transfer (XISF_PAGE_TO_BUF_TRANS): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___flash_to_buf_transfer_param.html">XIsf_FlashToBufTransferParam</a> . OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2. XISF_PAGE_BUFFER2 is not valid in the case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->Address is start address in the Serial Flash. This operation is only supported in Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer Read (XISF_BUFFER_READ) and Fast Buffer Read (XISF_FAST_BUFFER_READ): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___buffer_read_param.html">XIsf_BufferReadParam</a>. OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2. XISF_PAGE_BUFFER2 is not valid in case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->ReadPtr is pointer to the memory where the data read from the SRAM buffer is to be stored. OpParamPtr->ByteOffset is byte offset in the SRAM buffer from where the first byte is read. OpParamPtr->NumBytes is the number of bytes to be read from the Buffer. These operations are supported only in Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd><ul>
|
|
<li>Application must fill the structure elements of the third argument and pass its pointer by type casting it with void pointer.</li><li>The valid data is available from the fourth location pointed to by the ReadPtr for Normal Read and Buffer Read operations.</li><li>The valid data is available from the fifth location pointed to by the ReadPtr for Fast Read, Fast Buffer Read and OTP Read operations.</li><li>The valid data is available from the (4 + NumDummyBytes)th location pointed to by ReadPtr for Dual/Quad Read operations. </li></ul>
|
|
</dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="4174b1267c14caafc2b4626cbcca6759"></a><!-- doxytag: member="xilisf.h::XIsf_SectorProtect" ref="4174b1267c14caafc2b4626cbcca6759" args="(XIsf *InstancePtr, XIsf_SpOperation Operation, u8 *BufferPtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_SectorProtect </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="xilisf_8h.html#9b4085aba9552af9b456b6aa0cc91e50">XIsf_SpOperation</a> </td>
|
|
<td class="mdname" nowrap> <em>Operation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 * </td>
|
|
<td class="mdname" nowrap> <em>BufferPtr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API is used for performing Sector Protect related operations.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Operation</em> </td><td>is the type of Sector Protect operation to be performed on the Serial Flash. The different operations are<ul>
|
|
<li>XISF_SPR_READ: Read Sector Protection Register</li><li>XISF_SPR_WRITE: Write Sector Protection Register</li><li>XISF_SPR_ERASE: Erase Sector Protection Register</li><li>XISF_SP_ENABLE: Enable Sector Protection</li><li>XISF_SP_DISABLE: Disable Sector Protection </li></ul>
|
|
</td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>BufferPtr</em> </td><td>is a pointer to the memory where the SPR content is read to/written from. This argument can be NULL if the Operation is SprErase, SpEnable and SpDisable.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd><ul>
|
|
<li>The SPR content is stored at the fourth location pointed by the BufferPtr when performing XISF_SPR_READ operation.</li><li>For Intel, STM, Winbond and Spansion Serial Flash, the user application must call the <a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable()</a> API by passing XISF_WRITE_ENABLE as an argument, before calling the <a class="el" href="xilisf_8h.html#4174b1267c14caafc2b4626cbcca6759">XIsf_SectorProtect()</a> API, for Sector Protect Register Write (XISF_SPR_WRITE) operation.</li><li>Atmel Flash supports all these Sector Protect operations.</li><li>Intel, STM, Winbond and Spansion Flash support only Sector Protect Read and Sector Protect Write operations. </li></ul>
|
|
</dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="25b8b893226596531c19fe40f1a29cc7"></a><!-- doxytag: member="xilisf.h::XIsf_SetSpiConfiguration" ref="25b8b893226596531c19fe40f1a29cc7" args="(XIsf *InstancePtr, XIsf_Iface *SpiInstPtr, u32 Options, u8 PreScaler)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_SetSpiConfiguration </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>XIsf_Iface * </td>
|
|
<td class="mdname" nowrap> <em>SpiInstPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>Options</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 </td>
|
|
<td class="mdname" nowrap> <em>PreScaler</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API sets the configuration of SPI. This will set the options and clock prescaler (if applicable).<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>SpiInstPtr</em> </td><td>is a pointer to the XIsf_Iface instance to be worked on. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Options</em> </td><td>contains specified options to be set. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>PreScaler</em> </td><td>is the value of the clock prescaler to set.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>This API can be called before calling <a class="el" href="xilisf_8h.html#a49172a16258a144cb357139b3c5ec9f">XIsf_Initialize()</a> to initialize the SPI interface in other than default options mode. PreScaler is only applicable to PS SPI/QSPI. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="ffd7e46280baaec6036a14b9c56d2c85"></a><!-- doxytag: member="xilisf.h::XIsf_Write" ref="ffd7e46280baaec6036a14b9c56d2c85" args="(XIsf *InstancePtr, XIsf_WriteOperation Operation, void *OpParamPtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_Write </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="xilisf_8h.html#807b0746a7fb7574beee1c11fdc9bb9f">XIsf_WriteOperation</a> </td>
|
|
<td class="mdname" nowrap> <em>Operation</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>void * </td>
|
|
<td class="mdname" nowrap> <em>OpParamPtr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API writes the data to the Serial Flash.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Operation</em> </td><td>is the type of write operation to be performed on the Serial Flash. The different operations are<ul>
|
|
<li>XISF_WRITE: Normal Write</li><li>XISF_DUAL_IP_PAGE_WRITE: Dual Input Fast Program</li><li>XISF_DUAL_IP_EXT_PAGE_WRITE: Dual Input Extended Fast Program</li><li>XISF_QUAD_IP_PAGE_WRITE: Quad Input Fast Program</li><li>XISF_QUAD_IP_EXT_PAGE_WRITE: Quad Input Extended Fast Program</li><li>XISF_AUTO_PAGE_WRITE: Auto Page Write</li><li>XISF_BUFFER_WRITE: Buffer Write</li><li>XISF_BUF_TO_PAGE_WRITE_WITH_ERASE: Buffer to Page Transfer with Erase</li><li>XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE: Buffer to Page Transfer without Erase</li><li>XISF_WRITE_STATUS_REG: Status Register Write</li><li>XISF_WRITE_STATUS_REG2: 2 byte Status Register Write</li><li>XISF_OTP_WRITE: OTP Write.</li></ul>
|
|
</td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>OpParamPtr</em> </td><td>is the pointer to a structure variable which contains operational parameters of the specified operation. This parameter type is dependant on value of first argument (Operation).</td></tr>
|
|
</table>
|
|
</dl>
|
|
<ul>
|
|
<li>Normal Write (XISF_WRITE), Dual Input Fast Program (XISF_DUAL_IP_PAGE_WRITE), Dual Input Extended Fast Program (XISF_DUAL_IP_EXT_PAGE_WRITE), Quad Input Fast Program (XISF_QUAD_IP_PAGE_WRITE), Quad Input Extended Fast Program (XISF_QUAD_IP_EXT_PAGE_WRITE): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___write_param.html">XIsf_WriteParam</a>. OpParamPtr->Address is the start address in the Serial Flash. OpParamPtr->WritePtr is a pointer to the data to be written to the Serial Flash. OpParamPtr->NumBytes is the number of bytes to be written to the Serial Flash. This operation is supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Auto Page Write (XISF_AUTO_PAGE_WRITE): The OpParamPtr must be of 32 bit unsigned integer variable. This is the address of page number in the Serial Flash which is to be refreshed. This operation is only supported for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer Write (XISF_BUFFER_WRITE): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___buffer_to_flash_write_param.html">XIsf_BufferToFlashWriteParam</a>. OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2. XISF_PAGE_BUFFER2 is not valid in the case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->WritePtr is a pointer to the data to be written to the Serial Flash SRAM Buffer. OpParamPtr->ByteOffset is byte offset in the buffer from where the data is to be written. OpParamPtr->NumBytes is the number of bytes to be written to the Buffer. This operation is supported only for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Buffer To Memory Write With Erase (XISF_BUF_TO_PAGE_WRITE_WITH_ERASE)/ Buffer To Memory Write Without Erase (XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___buffer_to_flash_write_param.html">XIsf_BufferToFlashWriteParam</a>. OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2. XISF_PAGE_BUFFER2 is not valid in the case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->Address is starting address in the Serial Flash memory from where the data is to be written. These operations are only supported for Atmel Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Write Status Register (XISF_WRITE_STATUS_REG): The OpParamPtr must be of type of 8 bit unsigned integer variable. This is the value to be written to the Status Register. This operation is only supported for Intel, STM Winbond and Spansion Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>Write Status Register2 (XISF_WRITE_STATUS_REG2): The OpParamPtr must be of type (u8 *) and should point to two 8 bit unsigned integer values. This is the value to be written to the 16 bit Status Register. This operation is only supported in Winbond (W25Q) Serial Flash.</li></ul>
|
|
<p>
|
|
<ul>
|
|
<li>One Time Programmable Area Write (XISF_OTP_WRITE): The OpParamPtr must be of type struct <a class="el" href="struct_x_isf___write_param.html">XIsf_WriteParam</a>. OpParamPtr->Address is the address in the SRAM Buffer of the Serial Flash to which the data is to be written. OpParamPtr->WritePtr is a pointer to the data to be written to the Serial Flash. OpParamPtr->NumBytes should be set to 1 when performing OTPWrite operation. This operation is only supported for Intel Serial Flash.</li></ul>
|
|
<p>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd><ul>
|
|
<li>Application must fill the structure elements of the third argument and pass its pointer by type casting it with void pointer.</li><li>For Intel, STM, Winbond and Spansion Serial Flash, the user application must call the <a class="el" href="xilisf_8h.html#ce8dd0bdcd65aa50b52fd1d61a1fb5f3">XIsf_WriteEnable()</a> API by passing XISF_WRITE_ENABLE as an argument, before calling the <a class="el" href="xilisf_8h.html#ffd7e46280baaec6036a14b9c56d2c85">XIsf_Write()</a> API. </li></ul>
|
|
</dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="ce8dd0bdcd65aa50b52fd1d61a1fb5f3"></a><!-- doxytag: member="xilisf.h::XIsf_WriteEnable" ref="ce8dd0bdcd65aa50b52fd1d61a1fb5f3" args="(XIsf *InstancePtr, u8 WriteEnable)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XIsf_WriteEnable </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_isf.html">XIsf</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 </td>
|
|
<td class="mdname" nowrap> <em>WriteEnable</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This API Enables/Disables writes to the Intel, STM, Winbond and Spansion Serial Flash.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_isf.html">XIsf</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>WriteEnable</em> </td><td>specifies whether to Enable (XISF_CMD_ENABLE_WRITE) or Disable (XISF_CMD_DISABLE_WRITE) the writes to the Serial Flash.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>XST_SUCCESS if successful else XST_FAILURE.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>This API works only for Intel, STM, Winbond and Spansion Serial Flash. If this API is called for Atmel Flash, XST_FAILURE is returned. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr size="1"><address style="align: right;"><small>Generated on Thu Feb 13 14:38:18 2014 for 2014.1_doc by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
|
|
</body>
|
|
</html>
|