Author
|
Matrix TSL
|
Version
|
1.0
|
Category
|
Storage
|
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.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
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.
|
[[File:]] -
|
Status
|
1 = Write Enabled, 0 = Write Protected
|
- VOID
|
Return
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
[[File:]] -
|
Blocking
|
Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait
|
- VOID
|
Return
|
|
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
|
|
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
|
[[File:]] -
|
Blocking
|
Controls if the macro blocks until the erase cycle is complete. 0 = Don't Wait, 1 = Wait
|
- VOID
|
Return
|
|
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
|
|
Initialise
|
Initialises the SPI bus ready for communications.
|
- VOID
|
Return
|
|
Initialise
|
Configures each matching sensor on the bus with the specified conversion bits.
|
- VOID
|
Return
|
|
SendBinaryFloat
|
Sends out a 32-bit binary floating point value split across four bytes.
|
[[File:]] -
|
Value
|
|
[[File:]] -
|
MSBfirst
|
0=Least significant byte first, 1=Most significant byte first
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
Return
|
|
ReceiveByteArray
|
Attempts to receive an array of bytes using the COM port Returns the number of bytes received.
|
- BYTE
|
Data
|
|
- UINT
|
MaxLength
|
Max number of bytes to try and read
|
- UINT
|
Timeout
|
Time to wait for incoming data in milliseconds
|
- UINT
|
Return
|
|
ReceiveString
|
Attempts to receive an string using the COM port Returns the number of bytes received.
|
- UINT
|
Timeout
|
Time to wait for incoming data in milliseconds
|
- UINT
|
MaxLength
|
Max number of bytes to try and read
|
- STRING
|
Return
|
|
PWMEnable
|
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD
|
- BYTE
|
EnableMask
|
Range 0-63 or 0b00000 to 0b111111
|
- VOID
|
Return
|
|
Initialise
|
|
- VOID
|
Return
|
|
GetProp
|
Allows the property filter for the COM port list to be copied to a parent component.
|
- STRING
|
PropName
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Memory Size
|
Sets the size of the flash memory available on the chip.
|
|
Number Bytes
|
|
|
Number Pages
|
|
|
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 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
|
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|
|
Console Data
|
Selects if the console data is automatically generated or not
|
|
API
|
|
|
Connections
|
|
Simulations
|
|
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.
|