Declarations of Standardflash functions.
Definition in file standardflash.h.
#include "cmd_defs.h"
#include "spi_driver.h"
#include "helper_functions.h"
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Functions | |
void | standardflashWaitOnReady () |
: Wait while Read/Busy Status bit in SRB is 1 (device is busy). This is accomplished by reading the first status register and delaying while the BSY bit is 1. More... | |
void | standardflashSetQEBit () |
: Sets the QE bit in status register byte 2. Does not modify any other bits. This is accomplished by first reading both bytes, performing a write enable, then writing the status register data back in with the QE bit set. More... | |
void | standardflashClearQEBit () |
: Clears the QE bit in status register byte 2. Does not modify any other bits. This is accomplished by first reading both bytes, performing a write enable, then writing the status register data back in with the QE bit cleared. More... | |
void | standardflashWriteEnable () |
OPCODE: 0x06 Sends opcode to enable writing. More... | |
void | standardflashWriteDisable () |
OPCODE: 0x04 Sends opcode to disable writing. More... | |
void | standardflashReadArrayLowFreq (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes) |
OPCODE: 0x03 Reads rxNumBytes starting from location 'address' and stores the data in the byte array rxBuffer. This command reads from a page in main memory at a lower frequency than other commands as specified in the datasheet. More... | |
void | standardflashReadArrayHighFreq (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes) |
OPCODE: 0x0B Reads rxNumBytes starting from location 'address' and stores the data in the byte array rxBuffer. This command reads from a page in main memory at a higher frequency than other commands as specified in the datasheet. More... | |
void | standardflashBytePageProgram (uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes) |
OPCODE: 0x02 Programs 'txNumBytes' bytes of data starting at the address indicated by address. More... | |
void | standardflashBlockErase4K (uint32_t address) |
OPCODE: 0x20 Erases a block of data (4 KBytes) starting from page address 'address.'. More... | |
void | standardflashBlockErase32K (uint32_t address) |
OPCODE: 0x52 Erases a block of data (4 KBytes) starting from page address 'address.'. More... | |
void | standardflashBlockErase64K (uint32_t address) |
OPCODE: 0xD8 Erases a block of data (4 KBytes) starting from page address 'address.'. More... | |
void | standardflashChipErase1 () |
OPCODE: 0x60 Erases the entire chip by setting all bits. standardflashChipErase2() is functionally equivalent. More... | |
void | standardflashChipErase2 () |
OPCODE: 0xC7 Erases the entire chip by setting all bits. standardflashChipErase1() is functionally equivalent. More... | |
void | standardflashDPD () |
OPCODE: 0xB9 Put the device into deep power down mode. Call dataflashResumeFromDPD() to wake up, or perform a hardware reset dataflashHardwareReset(). More... | |
void | standardflashResumeFromDPD () |
OPCODE: 0xAB Wake the device from deep power down mode. See dataflashDPD(). More... | |
void | standardflashReadID (uint8_t *rxBuffer) |
OPCODE: 0x90 Legace Command: Reads the manufacturer ID and stores the data in rxBuffer. More... | |
void | standardflashReadMID (uint8_t *rxBuffer) |
OPCODE: 0x9F Reads the manufacturer ID and stores the data in rxBuffer. More... | |
void | standardflashWriteSR (uint8_t *txBuffer, uint8_t txNumBytes) |
OPCODE: 0x01 Writes the value in data to the status register byte 1, or bytes 1 and 2. At least 1 byte needs to be written. More... | |
void | standardflashWriteSRB1 (uint8_t regVal) |
void | standardflashWriteSRB2 (uint8_t regVal) |
void | standardflashWriteEnableVolatileSR () |
OPCODE: 0x50 Sends opcode to enable writing for the volatile status register. More... | |
uint8_t | standardflashReadSRB1 () |
OPCODE: 0x05 Reads the value in the device status register (byte 1). More... | |
uint8_t | standardflashReadSRB2 () |
OPCODE: 0x35 Reads the value in the device status register (byte 2). More... | |
void | standardflashDualOutputRead (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes) |
OPCODE: 0x3B Reads 'txNumBytes' bytes of data in Dual Output Mode starting at 'address' using both SI and SO as inputs to master. More... | |
void | standardflashDualIORead (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes, uint8_t readMode, uint8_t modeByteValue) |
OPCODE: 0xBB Reads 'txNumBytes' bytes of data in Dual IO Mode starting at 'address' using both SI and SO as inputs to master. Depending on the readMode parameter the user can eliminate the need to send the opcode over if a continuous read is being performed. See the comments for readMode. More... | |
void | standardflashQuadOutputRead (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes) |
OPCODE: 0x6B Reads 'txNumBytes' bytes of data in Quad Output Mode starting at 'address' using SI, SO, WPb, and HOLDb as inputs to master. More... | |
void | standardflashQuadIORead (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes, uint8_t readMode, uint8_t modeByteValue) |
OPCODE: 0xEB Reads 'txNumBytes' bytes of data in Quad IO Mode starting at 'address' using SI, SO, WPb, and HOLDb as inputs to master. Depending on the readMode parameter the user can eliminate the need to send the opcode over if a continuous read is being performed. See the comments for readMode. More... | |
void | standardflashContinuousReadModeDualReset () |
OPCODE: 0xFFFF Resets the dual continuous read mode that was entered with standardflashDualIORead() when readMode 2 was used. Data from and to the device will be in standard SPI after using this command. More... | |
void | standardflashContinuousReadModeQuadReset () |
OPCODE: 0xFF Resets the quad continuous read mode that was entered with standardflashQuadIORead() when readMode 2 was used. Data from and to the device will be in standard SPI after using this command. More... | |
void | standardflashEraseSecurityRegister (uint32_t address) |
OPCODE: 0x44 Sends opcode to erase the security registers. More... | |
void | standardflashProgramSecurityRegisters (uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes) |
OPCODE: 0x42 Programs the security registers with the contents of txBuffer. More... | |
void | standardflashReadSecurityRegisters (uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes) |
OPCODE: 0x48 Reads the contents of the security registers and stores it in the rxBuffer. More... | |
void | standardflashResumeFromDPDReadID (uint8_t *rxBuffer) |
OPCODE: 0xAB Wake the device from deep power down mode and read the 1 byte ID. See standardflashDPD(). More... | |
void | standardflashQuadPageProgram (uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes, uint8_t mode) |
OPCODE: 0x33 Programs 'txNumBytes' bytes of data starting at the address indicated by address using Quad IO. More... | |
void | standardflashEraseProgramSuspend () |
OPCODE: 0x75 Suspends an erase or program mid operation. More... | |
void | standardflashEraseProgramResume () |
OPCODE: 0x7A Resumes a previously suspended erase or program. More... | |
void | standardflashEnableQPI () |
OPCODE: 0x38 Switches the device from SPI mode to QPI mode, and sets a variable to quad mode. More... | |
void | standardflashDisableQPI () |
OPCODE: 0xFF Switches the device from QPI mode to SPI mode, and sets a variable to spi mode. More... | |
void | standardflashEnableReset () |
OPCODE: 0x66 Enable software reset of the flash device. More... | |
void | standardflashReset () |
OPCODE: 0x99 Software reset the flash device. More... | |
void | standardflashEnterSecureOTP () |
OPCODE: 0xB1 Enter secured OTP region. More... | |
void | standardflashExitSecuredOTP () |
OPCODE: 0xC1 Exit secured OTP region. More... | |
void | standardflashReadSR (uint8_t *rxBuffer) |
OPCODE: 0x05 Reads the value in the device status register (byte 1 and 2). More... | |
void | standardflashDualInputBytePageProgram (uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes) |
OPCODE: 0xA2 Programs 'txNumBytes' bytes of data starting at the address indicated by address using both the MISO and MOSI lines is inputs to the device. More... | |
void | standardflashProgramEraseSuspend () |
OPCODE: 0xB0 Suspends an erase or program mid operation. More... | |
void | standardflashProgramEraseResume () |
OPCODE: 0xD0 Resumes a previously suspended erase or program. More... | |
void | standardflashProtectSector (uint32_t address) |
OPCODE: 0x36 Protects a sector containing the address address. More... | |
void | standardflashUnprotectSector (uint32_t address) |
OPCODE: 0x39 Un-protects a sector containing the address address. More... | |
uint8_t | standardflashReadSectorProtectionReg (uint32_t address) |
OPCODE: 0x3C Reads the sector protection register for address address. More... | |
void | standardflashFreezeLockdownState () |
OPCODE: 0x34 Freezes the current state of the sector lockdown registers. More... | |
uint8_t | standardflashReadLockdownReg (uint32_t address) |
OPCODE: 0x35 Reads the sector lockdown register for address address. More... | |
void | standardflashProgramOTPReg (uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes) |
OPCODE: 0x9B Programs 'txNumBytes' bytes of data to the OTP register starting at the address indicated by address. More... | |
Variables | |
uint8_t | txStandardflashInternalBuffer [MAXIMUM_TX_BYTES] |
void standardflashBlockErase32K | ( | uint32_t | address | ) |
OPCODE: 0x52
Erases a block of data (4 KBytes) starting from page address 'address.'.
address | The 3 byte page address at which the block erase will start. |
void |
Definition at line 254 of file standardflash.c.
void standardflashBlockErase4K | ( | uint32_t | address | ) |
OPCODE: 0x20
Erases a block of data (4 KBytes) starting from page address 'address.'.
address | The 3 byte page address at which the block erase will start. |
void |
Definition at line 241 of file standardflash.c.
void standardflashBlockErase64K | ( | uint32_t | address | ) |
OPCODE: 0xD8
Erases a block of data (4 KBytes) starting from page address 'address.'.
address | The 3 byte page address at which the block erase will start. |
void |
Definition at line 267 of file standardflash.c.
void standardflashBytePageProgram | ( | uint32_t | address, |
uint8_t * | txBuffer, | ||
uint32_t | txNumBytes | ||
) |
OPCODE: 0x02
Programs 'txNumBytes' bytes of data starting at the address indicated by address.
address | The 3 bytes address indicating the first location to be written to. |
txBuffer | Pointer to the tx bytes that will be stored in memory. Must have a minimum of txNumBytes elements. |
txNumBytes | Number of bytes to be written to the device. txBuffer must have a minimum of this many elements. |
void |
Definition at line 220 of file standardflash.c.
void standardflashChipErase1 | ( | ) |
OPCODE: 0x60
Erases the entire chip by setting all bits. standardflashChipErase2() is functionally equivalent.
void |
Definition at line 280 of file standardflash.c.
void standardflashChipErase2 | ( | ) |
OPCODE: 0xC7
Erases the entire chip by setting all bits. standardflashChipErase1() is functionally equivalent.
void |
Definition at line 293 of file standardflash.c.
void standardflashClearQEBit | ( | ) |
: Clears the QE bit in status register byte 2. Does not modify any other bits. This is accomplished by first reading both bytes, performing a write enable, then writing the status register data back in with the QE bit cleared.
This is a 'derived' command which uses multiple single commands to accomplish a set task.
void |
Definition at line 135 of file standardflash.c.
void standardflashContinuousReadModeDualReset | ( | ) |
OPCODE: 0xFFFF
Resets the dual continuous read mode that was entered with standardflashDualIORead() when readMode 2 was used. Data from and to the device will be in standard SPI after using this command.
void |
Definition at line 635 of file standardflash.c.
void standardflashContinuousReadModeQuadReset | ( | ) |
OPCODE: 0xFF
Resets the quad continuous read mode that was entered with standardflashQuadIORead() when readMode 2 was used. Data from and to the device will be in standard SPI after using this command.
void |
Definition at line 646 of file standardflash.c.
void standardflashDisableQPI | ( | ) |
OPCODE: 0xFF
Switches the device from QPI mode to SPI mode, and sets a variable to spi mode.
void |
Definition at line 796 of file standardflash.c.
void standardflashDPD | ( | ) |
OPCODE: 0xB9 Put the device into deep power down mode. Call dataflashResumeFromDPD() to wake up, or perform a hardware reset dataflashHardwareReset().
void |
Definition at line 306 of file standardflash.c.
void standardflashDualInputBytePageProgram | ( | uint32_t | address, |
uint8_t * | txBuffer, | ||
uint32_t | txNumBytes | ||
) |
OPCODE: 0xA2
Programs 'txNumBytes' bytes of data starting at the address indicated by address using both the MISO and MOSI lines is inputs to the device.
address | The 3 bytes address indicating the first location to be written to. |
txBuffer | Pointer to the tx bytes that will be stored in memory. Must have a minimum of txNumBytes elements. |
txNumBytes | Number of bytes to be written to the device. txBuffer must have a minimum of this many elements. |
void |
Definition at line 883 of file standardflash.c.
void standardflashDualIORead | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes, | ||
uint8_t | readMode, | ||
uint8_t | modeByteValue | ||
) |
OPCODE: 0xBB
Reads 'txNumBytes' bytes of data in Dual IO Mode starting at 'address' using both SI and SO as inputs to master. Depending on the readMode parameter the user can eliminate the need to send the opcode over if a continuous read is being performed. See the comments for readMode.
address | Address starting from which the data in memory will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
readMode | The read mode which selects between 4 different modes.
|
modeByteValue | This value should be set to the M7-0 byte listed in the datasheet for a continuous operation. The overhead of setting up the opcode, address, and mode byte is taken care of, but different devices within the same family will use a different mode value. Please note, this is taken care of in the sample code when defining which part is being used. See main() in standardflash.c. |
void |
Definition at line 501 of file standardflash.c.
void standardflashDualOutputRead | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes | ||
) |
OPCODE: 0x3B
Reads 'txNumBytes' bytes of data in Dual Output Mode starting at 'address' using both SI and SO as inputs to master.
address | Address starting from which the data in memory will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
void |
Definition at line 491 of file standardflash.c.
void standardflashEnableQPI | ( | ) |
OPCODE: 0x38
Switches the device from SPI mode to QPI mode, and sets a variable to quad mode.
void |
Definition at line 784 of file standardflash.c.
void standardflashEnableReset | ( | ) |
OPCODE: 0x66
Enable software reset of the flash device.
void |
Definition at line 808 of file standardflash.c.
void standardflashEnterSecureOTP | ( | ) |
OPCODE: 0xB1
Enter secured OTP region.
void |
Definition at line 834 of file standardflash.c.
void standardflashEraseProgramResume | ( | ) |
OPCODE: 0x7A
Resumes a previously suspended erase or program.
void |
Definition at line 758 of file standardflash.c.
void standardflashEraseProgramSuspend | ( | ) |
OPCODE: 0x75
Suspends an erase or program mid operation.
void |
Definition at line 745 of file standardflash.c.
void standardflashEraseSecurityRegister | ( | uint32_t | address | ) |
OPCODE: 0x44
Sends opcode to erase the security registers.
void |
Definition at line 659 of file standardflash.c.
void standardflashExitSecuredOTP | ( | ) |
OPCODE: 0xC1
Exit secured OTP region.
void |
Definition at line 847 of file standardflash.c.
void standardflashFreezeLockdownState | ( | ) |
OPCODE: 0x34
Freezes the current state of the sector lockdown registers.
void |
Definition at line 952 of file standardflash.c.
void standardflashProgramEraseResume | ( | ) |
OPCODE: 0xD0
Resumes a previously suspended erase or program.
void |
Definition at line 911 of file standardflash.c.
void standardflashProgramEraseSuspend | ( | ) |
OPCODE: 0xB0
Suspends an erase or program mid operation.
void |
Definition at line 901 of file standardflash.c.
void standardflashProgramOTPReg | ( | uint32_t | address, |
uint8_t * | txBuffer, | ||
uint32_t | txNumBytes | ||
) |
OPCODE: 0x9B
Programs 'txNumBytes' bytes of data to the OTP register starting at the address indicated by address.
address | The 3 bytes address indicating the first location to be written to. |
txBuffer | Pointer to the tx bytes that will be stored in memory. Must have a minimum of txNumBytes elements. |
txNumBytes | Number of bytes to be written to the device. txBuffer must have a minimum of this many elements. |
void |
Definition at line 975 of file standardflash.c.
void standardflashProgramSecurityRegisters | ( | uint32_t | address, |
uint8_t * | txBuffer, | ||
uint32_t | txNumBytes | ||
) |
OPCODE: 0x42
Programs the security registers with the contents of txBuffer.
address | Address starting from which the data in txBuffer will be stored within the security register. |
txBuffer | Pointer to the tx bytes that will be stored in memory. Must have a minimum of txNumBytes elements. |
txNumBytes | Number of bytes to be written to the device. txBuffer must have a minimum of this many elements. |
void |
Definition at line 669 of file standardflash.c.
void standardflashProtectSector | ( | uint32_t | address | ) |
OPCODE: 0x36 Protects a sector containing the address address.
void |
Definition at line 921 of file standardflash.c.
void standardflashQuadIORead | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes, | ||
uint8_t | readMode, | ||
uint8_t | modeByteValue | ||
) |
OPCODE: 0xEB
Reads 'txNumBytes' bytes of data in Quad IO Mode starting at 'address' using SI, SO, WPb, and HOLDb as inputs to master. Depending on the readMode parameter the user can eliminate the need to send the opcode over if a continuous read is being performed. See the comments for readMode.
address | Address starting from which the data in memory will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
readMode | The read mode which selects between 4 different modes.
|
modeByteValue | This value should be set to the M7-0 byte listed in the datasheet for a continuous operation. The overhead of setting up the opcode, address, and mode byte is taken care of, but different devices within the same family will use a different mode value. Please note, this is taken care of in the sample code when defining which part is being used. See main() in standardflash.c. |
void |
Definition at line 570 of file standardflash.c.
void standardflashQuadOutputRead | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes | ||
) |
OPCODE: 0x6B
Reads 'txNumBytes' bytes of data in Quad Output Mode starting at 'address' using SI, SO, WPb, and HOLDb as inputs to master.
address | Address starting from which the data in memory will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
void |
Definition at line 560 of file standardflash.c.
void standardflashQuadPageProgram | ( | uint32_t | address, |
uint8_t * | txBuffer, | ||
uint32_t | txNumBytes, | ||
uint8_t | mode | ||
) |
OPCODE: 0x33
Programs 'txNumBytes' bytes of data starting at the address indicated by address using Quad IO.
address | The 3 bytes address indicating the first location to be written to. |
txBuffer | Pointer to the tx bytes that will be stored in memory. Must have a minimum of txNumBytes elements. |
txNumBytes | Number of bytes to be written to the device. txBuffer must have a minimum of this many elements. |
mode | Determines which mode to use when sending data over. If mode is 0, the command will use SPI mode at detailed in the datasheet. If mode is 1, Quad mode will be used as detailed in the datasheet. |
void |
Definition at line 710 of file standardflash.c.
void standardflashReadArrayHighFreq | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes | ||
) |
OPCODE: 0x0B
Reads rxNumBytes starting from location 'address' and stores the data in the byte array rxBuffer. This command reads from a page in main memory at a higher frequency than other commands as specified in the datasheet.
address | 3 byte address starting from which the data in memory will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
void |
Definition at line 207 of file standardflash.c.
void standardflashReadArrayLowFreq | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes | ||
) |
OPCODE: 0x03
Reads rxNumBytes starting from location 'address' and stores the data in the byte array rxBuffer. This command reads from a page in main memory at a lower frequency than other commands as specified in the datasheet.
address | 3 byte address starting from which the data in memory will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
void |
Definition at line 197 of file standardflash.c.
void standardflashReadID | ( | uint8_t * | rxBuffer | ) |
OPCODE: 0x90
Legace Command: Reads the manufacturer ID and stores the data in rxBuffer.
rxBuffer | Pointer to a byte array in which the data will be stored. Minimum of 2 bytes required. |
void |
Definition at line 332 of file standardflash.c.
uint8_t standardflashReadLockdownReg | ( | uint32_t | address | ) |
OPCODE: 0x35
Reads the sector lockdown register for address address.
The | byte indicating whether or not the sector is locked-down. 0xFF indicates the sector is locked-down, 0x00 indicates the sector is not locked-down. |
Definition at line 963 of file standardflash.c.
void standardflashReadMID | ( | uint8_t * | rxBuffer | ) |
OPCODE: 0x9F
Reads the manufacturer ID and stores the data in rxBuffer.
rxBuffer | Pointer to a byte array in which the data will be stored. |
void |
Definition at line 345 of file standardflash.c.
uint8_t standardflashReadSectorProtectionReg | ( | uint32_t | address | ) |
OPCODE: 0x3C
Reads the sector protection register for address address.
The | byte indicating whether or not the sector is protected. 0xFF indicates the sector is protected, 0x00 indicates the sector is unprotected. |
Definition at line 940 of file standardflash.c.
void standardflashReadSecurityRegisters | ( | uint32_t | address, |
uint8_t * | rxBuffer, | ||
uint32_t | rxNumBytes | ||
) |
OPCODE: 0x48
Reads the contents of the security registers and stores it in the rxBuffer.
address | Address starting from which the data in the status register will be read. |
rxBuffer | Pointer to the byte array in which the read data will be stored. Must have at least rxNumBytes elements. |
rxNumBytes | Number of bytes to be read from the memory. rxBuffer must have a minimum of this many elements. |
void |
Definition at line 687 of file standardflash.c.
void standardflashReadSR | ( | uint8_t * | rxBuffer | ) |
OPCODE: 0x05
Reads the value in the device status register (byte 1 and 2).
void |
Definition at line 870 of file standardflash.c.
uint8_t standardflashReadSRB1 | ( | ) |
OPCODE: 0x05
Reads the value in the device status register (byte 1).
Byte | stored in the status register. |
Definition at line 461 of file standardflash.c.
uint8_t standardflashReadSRB2 | ( | ) |
OPCODE: 0x35
Reads the value in the device status register (byte 2).
Byte | stored in the status register. |
Definition at line 476 of file standardflash.c.
void standardflashReset | ( | ) |
OPCODE: 0x99
Software reset the flash device.
void |
Definition at line 821 of file standardflash.c.
void standardflashResumeFromDPD | ( | ) |
OPCODE: 0xAB
Wake the device from deep power down mode. See dataflashDPD().
void |
Definition at line 319 of file standardflash.c.
void standardflashResumeFromDPDReadID | ( | uint8_t * | rxBuffer | ) |
OPCODE: 0xAB
Wake the device from deep power down mode and read the 1 byte ID. See standardflashDPD().
rxBuffer | A byte array in which the device ID (single byte) will be stored. |
void |
Definition at line 697 of file standardflash.c.
void standardflashSetQEBit | ( | ) |
: Sets the QE bit in status register byte 2. Does not modify any other bits. This is accomplished by first reading both bytes, performing a write enable, then writing the status register data back in with the QE bit set.
This is a 'derived' command which uses multiple single commands to accomplish a set task.
void |
Definition at line 99 of file standardflash.c.
void standardflashUnprotectSector | ( | uint32_t | address | ) |
OPCODE: 0x39
Un-protects a sector containing the address address.
void |
Definition at line 930 of file standardflash.c.
void standardflashWaitOnReady | ( | ) |
: Wait while Read/Busy Status bit in SRB is 1 (device is busy). This is accomplished by reading the first status register and delaying while the BSY bit is 1.
This is a 'derived' command which uses multiple single commands to accomplish a set task.
void |
Definition at line 77 of file standardflash.c.
void standardflashWriteDisable | ( | ) |
OPCODE: 0x04
Sends opcode to disable writing.
void |
Definition at line 184 of file standardflash.c.
void standardflashWriteEnable | ( | ) |
OPCODE: 0x06
Sends opcode to enable writing.
void |
Definition at line 171 of file standardflash.c.
void standardflashWriteEnableVolatileSR | ( | ) |
OPCODE: 0x50
Sends opcode to enable writing for the volatile status register.
void |
Definition at line 448 of file standardflash.c.
void standardflashWriteSR | ( | uint8_t * | txBuffer, |
uint8_t | txNumBytes | ||
) |
OPCODE: 0x01
Writes the value in data to the status register byte 1, or bytes 1 and 2. At least 1 byte needs to be written.
txBuffer | Byte(s) of data to be written into the status register. |
txNumBytes | The number of bytes to be transmitted, either 1 or 2. |
void |
Definition at line 372 of file standardflash.c.
void standardflashWriteSRB1 | ( | uint8_t | regVal | ) |
Definition at line 406 of file standardflash.c.
void standardflashWriteSRB2 | ( | uint8_t | regVal | ) |
Definition at line 420 of file standardflash.c.
uint8_t txStandardflashInternalBuffer[MAXIMUM_TX_BYTES] |
Definition at line 73 of file standardflash.c.