Jump to content

Component: Serial Flash (W25) (EEPROM): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(11 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_SerialFlash_W25Q.fcfx FC_Comp_Source_SerialFlash_W25Q.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_SerialFlash_W25Q.fcfx FC_Comp_Source_SerialFlash_W25Q.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_SerialFlash_W25Q.fcfx FC_Comp_Source_SerialFlash_W25Q.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_SerialFlash_W25Q.fcfx FC_Comp_Source_SerialFlash_W25Q.fcfx]


==Detailed description==
==Detailed description==




Line 64: Line 68:




''<span style="color:red;">No additional examples</span>''




==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteControl'''
|-
| colspan="2" | Enables or disables writing for things like erasing and programming. Writes must be enabled after a power on reset and again after an erase command.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Status
|-
| colspan="2" | 1 = Write Enabled, 0 = Write Protected&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


''<span style="color:red;">No additional examples</span>''


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadStatus'''
|-
| colspan="2" | Reads one of the internal status registers on the device&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Reg
|-
| colspan="2" | Selects which status register to read, 0 = Status or 1 = Status 2.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataByte'''
|-
| colspan="2" | Reads a single data byte from the specified address.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadUniqueID'''
|-
| colspan="2" | Reads the 8-byte unique identifier from the IC. Useful if you need each board to have it's own guarenteed unique address or identifier.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID
|-
| colspan="2" | 8-Byte data array to store the unique ID read back from the IC.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteDataArray'''
|-
| colspan="2" | Writes an array of data bytes atarting at the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. Note that all bytes will be written to the same page.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" | Number of bytes to write.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EraseChip'''
|-
| colspan="2" | Erases all data stored on the chip. Chip erase takes between 20 seconds and 100 seconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Blocking
|-
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteDataByte'''
|-
| colspan="2" | Writes a single data byte to the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Data byte to write&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===EraseBlock===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EraseBlock'''
| width="90%" class="mtx-class-macrohead" | '''EraseBlock'''
|-
|-
| colspan="2" | Erases a block of data stored on the chip. Erase takes between 45 milliseconds and 2000 milliseconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
| colspan="2" | Erases a block of data stored on the chip. Erase takes between 45 milliseconds and 2000 milliseconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
Line 253: Line 116:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===EraseChip===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataArray'''
| width="90%" class="mtx-class-macrohead" | '''EraseChip'''
|-
|-
| colspan="2" | Reads up to 256 data bytes starting from the specified address. Note that all bytes will be read from the same page.&nbsp;
| colspan="2" | Erases all data stored on the chip. Chip erase takes between 20 seconds and 100 seconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | PageAddress
| width="90%" | Blocking
|-
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" | Number of bytes to read.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Byta array to store the incoming read data.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 286: Line 135:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===Initialise===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Initialises the SPI bus ready for communications.&nbsp;
| colspan="2" | Initialises the SPI bus ready for communications.&nbsp;
Line 299: Line 149:




 
===ReadDataArray===
 
{| class="mtx-class-macrotable wikitable"
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''ReadDataArray'''
|-
|-
|-
| colspan="2" | Reads up to 256 data bytes starting from the specified address. Note that all bytes will be read from the same page.&nbsp;
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Flash Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Memory Size
|-
| colspan="2" | Sets the size of the flash memory available on the chip.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Number Bytes
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Number Pages
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | SPI Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Channel
|-
| colspan="2" | SPI Channel selector&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Prescale
|-
| colspan="2" | Prescale option selector&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | MOSI
|-
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | MISO
|-
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CLK
|-
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CS / SS
|-
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Simulate Comms
|-
| colspan="2" | Decides how the simulation handles the data. No - Do no SPI simulation and allow all simulation data to come from a local text file. Yes - Use SPI simulation for use with Injector components etc.&nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | File Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| width="90%" | Simulation File
|-
| colspan="2" | Name of file to use to hold the contents of the simulated flash memory. $(srcdir) assigns the file to the same folder as the Flowcode project file.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Unique ID Lower 32-bit
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Unique ID Upper 32-bit
|-
| colspan="2" | &nbsp;
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteControl'''
|-
| colspan="2" | Enables or disables writing for things like erasing and programming. Writes must be enabled after a power on reset and again after an erase command.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Status
|-
| colspan="2" | 1 = Write Enabled, 0 = Write Protected&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadStatus'''
|-
| colspan="2" | Reads one of the internal status registers on the device&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Reg
|-
| colspan="2" | Selects which status register to read, 0 = Status or 1 = Status 2.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataByte'''
|-
| colspan="2" | Reads a single data byte from the specified address.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadUniqueID'''
|-
| colspan="2" | Reads the 8-byte unique identifier from the IC. Useful if you need each board to have it's own guarenteed unique address or identifier.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID
|-
| colspan="2" | 8-Byte data array to store the unique ID read back from the IC.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteDataArray'''
|-
| colspan="2" | Writes an array of data bytes atarting at the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. Note that all bytes will be written to the same page.&nbsp;
|-
|-
|-
|-
Line 489: Line 171:
| width="90%" | Count
| width="90%" | Count
|-
|-
| colspan="2" | Number of bytes to write.&nbsp;
| colspan="2" | Number of bytes to read.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
| width="90%" | Data
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Byta array to store the incoming read data.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 501: Line 183:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadDataByte===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EraseChip'''
| width="90%" class="mtx-class-macrohead" | '''ReadDataByte'''
|-
|-
| colspan="2" | Erases all data stored on the chip. Chip erase takes between 20 seconds and 100 seconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
| colspan="2" | Reads a single data byte from the specified address.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Blocking
|-
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteDataByte'''
|-
| colspan="2" | Writes a single data byte to the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly.&nbsp;
|-
|-
|-
|-
Line 537: Line 202:
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Data byte to write&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadStatus===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EraseBlock'''
| width="90%" class="mtx-class-macrohead" | '''ReadStatus'''
|-
|-
| colspan="2" | Erases a block of data stored on the chip. Erase takes between 45 milliseconds and 2000 milliseconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
| colspan="2" | Reads one of the internal status registers on the device&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | EraseMode
| width="90%" | Reg
|-
|-
| colspan="2" | 0=4KB / 1=32KB / 2=64KB&nbsp;
| colspan="2" | Selects which status register to read, 0 = Status or 1 = Status 2.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Blocking
|-
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===ReadUniqueID===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataArray'''
| width="90%" class="mtx-class-macrohead" | '''ReadUniqueID'''
|-
|-
| colspan="2" | Reads up to 256 data bytes starting from the specified address. Note that all bytes will be read from the same page.&nbsp;
| colspan="2" | Reads the 8-byte unique identifier from the IC. Useful if you need each board to have it's own guarenteed unique address or identifier.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
| width="90%" | ID
|-
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
| colspan="2" | 8-Byte data array to store the unique ID read back from the IC.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" | Number of bytes to read.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Byta array to store the incoming read data.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
Line 608: Line 245:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===WriteControl===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''WriteControl'''
|-
| colspan="2" | Initialises the SPI bus ready for communications.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
 
 
==Property reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Flash Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Memory Size
|-
| colspan="2" | Sets the size of the flash memory available on the chip.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Number Bytes
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Number Pages
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | SPI Properties
|-
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Channel
|-
| colspan="2" | SPI Channel selector&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Prescale
|-
| colspan="2" | Prescale option selector&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | MOSI
|-
| colspan="2" | SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | MISO
|-
| colspan="2" | SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CLK
|-
| colspan="2" | SPI Clock Pin CLK - The Clock signal is driven by the SPI master.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| width="90%" | CS / SS
|-
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. &nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Simulate Comms
|-
| colspan="2" | Decides how the simulation handles the data. No - Do no SPI simulation and allow all simulation data to come from a local text file. Yes - Use SPI simulation for use with Injector components etc.&nbsp;
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | File Simulation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| width="90%" | Simulation File
|-
| colspan="2" | Name of file to use to hold the contents of the simulated flash memory. $(srcdir) assigns the file to the same folder as the Flowcode project file.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Unique ID Lower 32-bit
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Unique ID Upper 32-bit
|-
| colspan="2" | &nbsp;
|}==Macro reference==
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteControl'''
|-
|-
| colspan="2" | Enables or disables writing for things like erasing and programming. Writes must be enabled after a power on reset and again after an erase command.&nbsp;
| colspan="2" | Enables or disables writing for things like erasing and programming. Writes must be enabled after a power on reset and again after an erase command.&nbsp;
Line 731: Line 264:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===WriteDataArray===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadStatus'''
|-
| colspan="2" | Reads one of the internal status registers on the device&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Reg
|-
| colspan="2" | Selects which status register to read, 0 = Status or 1 = Status 2.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataByte'''
|-
| colspan="2" | Reads a single data byte from the specified address.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadUniqueID'''
|-
| colspan="2" | Reads the 8-byte unique identifier from the IC. Useful if you need each board to have it's own guarenteed unique address or identifier.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ID
|-
| colspan="2" | 8-Byte data array to store the unique ID read back from the IC.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteDataArray'''
| width="90%" class="mtx-class-macrohead" | '''WriteDataArray'''
|-
|-
| colspan="2" | Writes an array of data bytes atarting at the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. Note that all bytes will be written to the same page.&nbsp;
| colspan="2" | Writes an array of data bytes atarting at the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. Note that all bytes will be written to the same page.&nbsp;
Line 823: Line 298:




{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===WriteDataByte===
|-
{| class="mtx-class-macrotable wikitable"
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EraseChip'''
|-
| colspan="2" | Erases all data stored on the chip. Chip erase takes between 20 seconds and 100 seconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Blocking
|-
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteDataByte'''
| width="90%" class="mtx-class-macrohead" | '''WriteDataByte'''
|-
|-
| colspan="2" | Writes a single data byte to the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly.&nbsp;
| colspan="2" | Writes a single data byte to the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly.&nbsp;
Line 867: Line 325:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EraseBlock'''
|-
| colspan="2" | Erases a block of data stored on the chip. Erase takes between 45 milliseconds and 2000 milliseconds to complete. Blocking mode is recommended to ensure write cycle is complete.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | EraseMode
|-
| colspan="2" | 0=4KB / 1=32KB / 2=64KB&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" | Blocking
|-
| colspan="2" | Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDataArray'''
|-
| colspan="2" | Reads up to 256 data bytes starting from the specified address. Note that all bytes will be read from the same page.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | PageAddress
|-
| colspan="2" | Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | ByteAddress
|-
| colspan="2" | A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Count
|-
| colspan="2" | Number of bytes to read.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | Byta array to store the incoming read data.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
|-
| colspan="2" | Initialises the SPI bus ready for communications.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Flash Properties
| width="90%" class="mtx-class-propfolder" | Flash Properties
|-
|-
|-
|-
Line 972: Line 354:
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | SPI Properties
| width="90%" class="mtx-class-propfolder" | SPI Properties
|-
|-
|-
|-
Line 1,006: Line 388:
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. &nbsp;
| colspan="2" | Chip Select / Slave Select Pin  Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device. &nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-
Line 1,015: Line 397:
| colspan="2" | Decides how the simulation handles the data. No - Do no SPI simulation and allow all simulation data to come from a local text file. Yes - Use SPI simulation for use with Injector components etc.&nbsp;
| colspan="2" | Decides how the simulation handles the data. No - Do no SPI simulation and allow all simulation data to come from a local text file. Yes - Use SPI simulation for use with Injector components etc.&nbsp;
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | File Simulation
| width="90%" class="mtx-class-propfolder" | File Simulation
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix TSL
Version 1.0
Category EEPROM


Serial Flash (W25) component

Component to allow support for the Winbond W25 range of SPI Flash devices. Compatible with various sizes of Flash including: 2Mb, 4Mb, 8Mb, 32Mb, 64Mb, 128Mb.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_SerialFlash_W25Q.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_SerialFlash_W25Q.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

EraseBlock

EraseBlock
Erases a block of data stored on the chip. Erase takes between 45 milliseconds and 2000 milliseconds to complete. Blocking mode is recommended to ensure write cycle is complete. 
- BYTE EraseMode
0=4KB / 1=32KB / 2=64KB 
- UINT PageAddress
Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF 
- BOOL Blocking
Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait 
- VOID Return


EraseChip

EraseChip
Erases all data stored on the chip. Chip erase takes between 20 seconds and 100 seconds to complete. Blocking mode is recommended to ensure write cycle is complete. 
- BOOL Blocking
Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait 
- VOID Return


Initialise

Initialise
Initialises the SPI bus ready for communications. 
- VOID Return


ReadDataArray

ReadDataArray
Reads up to 256 data bytes starting from the specified address. Note that all bytes will be read from the same page. 
- UINT PageAddress
Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF 
- BYTE ByteAddress
A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF 
- BYTE Count
Number of bytes to read. 
- BYTE Data
Byta array to store the incoming read data. 
- VOID Return


ReadDataByte

ReadDataByte
Reads a single data byte from the specified address. 
- UINT PageAddress
Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF 
- BYTE ByteAddress
A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF 
- BYTE Return


ReadStatus

ReadStatus
Reads one of the internal status registers on the device 
- BYTE Reg
Selects which status register to read, 0 = Status or 1 = Status 2. 
- BYTE Return


ReadUniqueID

ReadUniqueID
Reads the 8-byte unique identifier from the IC. Useful if you need each board to have it's own guarenteed unique address or identifier. 
- BYTE ID
8-Byte data array to store the unique ID read back from the IC. 
- VOID Return


WriteControl

WriteControl
Enables or disables writing for things like erasing and programming. Writes must be enabled after a power on reset and again after an erase command. 
- BOOL Status
1 = Write Enabled, 0 = Write Protected 
- VOID Return


WriteDataArray

WriteDataArray
Writes an array of data bytes atarting at the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. Note that all bytes will be written to the same page. 
- UINT PageAddress
Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF 
- BYTE ByteAddress
A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF 
- BYTE Count
Number of bytes to write. 
- BYTE Data
 
- VOID Return


WriteDataByte

WriteDataByte
Writes a single data byte to the specified address. Writes must be enabled and memory locations must be erased for data writes to function correctly. 
- UINT PageAddress
Address bits A23-A8 : 16-bit Address - Range 0x0000 - 0xFFFF 
- BYTE ByteAddress
A7-A0 : 8-bit Address within the page - Range 0x00 - 0xFF 
- BYTE Data
Data byte to write 
- VOID Return


Property reference

Properties
Flash Properties
Memory Size
Sets the size of the flash memory available on the chip. 
Number Bytes
 
Number Pages
 
SPI Properties
Channel
SPI Channel selector 
Prescale
Prescale option selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Simulation
Simulate Comms
Decides how the simulation handles the data. No - Do no SPI simulation and allow all simulation data to come from a local text file. Yes - Use SPI simulation for use with Injector components etc. 
File Simulation
Simulation File
Name of file to use to hold the contents of the simulated flash memory. $(srcdir) assigns the file to the same folder as the Flowcode project file. 
Unique ID Lower 32-bit
 
Unique ID Upper 32-bit