51 #if (PARTNO == AT45DB021E) || \ 52 (PARTNO == AT45DB041E) || \ 53 (PARTNO == AT45DB081E) || \ 54 (PARTNO == AT45DB161E) || \ 55 (PARTNO == AT45DB321E) || \ 56 (PARTNO == AT45DB641E) || \ 57 (PARTNO == AT45DQ161) || \ 58 (PARTNO == AT45DQ321) || \ 59 (PARTNO == AT25PE20) || \ 60 (PARTNO == AT25PE40) || \ 61 (PARTNO == AT25PE80) || \ 62 (PARTNO == AT25PE16) || \ 583 #if (PARTNO == AT45DQ161) || \ 584 (PARTNO == AT45DQ321) || \ 707 #if (PARTNO == AT45DB021E) || \ 708 (PARTNO == AT45DB041E) || \ 709 (PARTNO == AT45DB081E) || \ 710 (PARTNO == AT45DB161E) || \ 711 (PARTNO == AT45DB321E) || \ 712 (PARTNO == AT45DB641E) || \ 713 (PARTNO == AT45DQ161) || \ 714 (PARTNO == AT45DQ321) || \ 782 #if (PARTNO == AT45DB021E) || \ 783 (PARTNO == AT45DB041E) || \ 784 (PARTNO == AT45DB081E) || \ 785 (PARTNO == AT45DB161E) || \ 786 (PARTNO == AT45DB321E) || \ 787 (PARTNO == AT45DB641E) || \ 788 (PARTNO == AT45DQ161) || \ 789 (PARTNO == AT45DQ321) || \ 790 (PARTNO == AT25PE40) || \ 791 (PARTNO == AT25PE80) || \ 792 (PARTNO == AT25PE16) || \ void dataflashQuadInputBuffer2Write(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x47 Programs 'txNumBytes' bytes of data to buffer 2 starting at the address indicated by a...
void dataflashMemoryProgramThruBuffer2WithErase(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x85 Programs main memory through buffer 2 starting at the address indicated by 'address' w...
void dataflashMemtoBuffer1Compare(uint32_t address)
OPCODE: 0x60 Compare the contents of a page in main memory to the contents of buffer 1...
void dataflashArrayReadLowPower(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x01 Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
void dataflashBuffer2ReadLegacy(uint8_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x56 LEGACY: Reads rxNumBytes starting from location 'address' in buffer 2 and stores the d...
void dataflashHardwareReset()
Perform a JEDEC reset on the flash device.
void dataflashMemoryProgramThruBuffer1WithErase(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x82 Programs main memory through buffer 1 starting at the address indicated by 'address' w...
void dataflashMemoryPageRead(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0xD2 Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
void dataflashBuffer2ToMainMemoryWithErase(uint32_t address)
OPCODE: 0x86 Programs the entire buffer 2 page to main memory starting at the address indicated by ...
void dataflashDualOutputRead(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 ...
void dataflashSoftwareReset()
OPCODE: 0xF0_00_00_00 Perform a software reset on the device. This will terminate any read or write...
void dataflashProgSectorProtectionReg(uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x3D_2A_7F_FC Program the sector protection register with the data in txBuffer.
void dataflashRMWThruBuffer1(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x58 Reads main memory to buffer 1, modifies it, then writes the data back to main memory w...
void dataflashMemPageReadLegacy(uint8_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x52 LEGACY: Reads rxNumBytes starting from location 'address' and stores the data in the b...
void dataflashQuadDisable()
OPCODE: 0x3D2A8167 Programs the NV-QE bit to a logical 0 to disable the Quad I/O commands...
void dataflashSectorErase(uint32_t address)
OPCODE: 0x7C
void dataflashBuffer1ReadLowFreq(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0xD1 Reads rxNumBytes starting from location 'address' in buffer 1 and stores the data in t...
void dataflashBuffer1ReadLegacy(uint8_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x54 LEGACY: Reads rxNumBytes starting from location 'address' in buffer 2 and stores the dat...
void dataflashMemtoBuffer1Transfer(uint32_t address)
OPCODE: 0x53 Transfer the contents of a page in main memory at the address indicated by 'address' t...
void dataflashEraseSectorProtectionReg()
OPCODE: 0x3D_2A_7F_CF Erases the sector protection register. Erasing is required for modification/s...
void dataflashBuffer2ToMainMemoryWithoutErase(uint32_t address)
OPCODE: 0x89 Programs the entire buffer 2 page to main memory starting at the address indicated by ...
void dataflashArrayReadLowFreq(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x03 Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
void dataflashArrayReadHighFreq1(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x1B Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
void dataflashProgSecurityReg(uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x9B_00_00_00 Program the security register with the data in txBuffer.
void dataflashReadSR(uint8_t *rxBuffer)
OPCODE: 0xD7 Reads the value in the device status register (bytes 1 and 2).
void dataflashReadSRLegacy(uint8_t *rxBuffer)
OPCODE: 0x57 LEGACY: Reads the value in the device status register (bytes 1 and 2)...
uint8_t txDataflashInternalBuffer[MAXIMUM_TX_BYTES]
void dataflashPageErase(uint32_t address)
OPCODE: 0x81 Erases a page of data (256/264 Bytes) starting from page address 'address.'.
void dataflashQuadEnable()
OPCODE: 0x3D2A8166 Programs the NV-QE bit to a logical 1 to enable the Quad I/O commands...
void dataflashFreezeSectorLockdown()
OPCODE: 0x34_55_AA_40 Permanently freeze the sector lockdown register to prevent any future changes...
void dataflashBuffer2ReadLowFreq(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0xD3 Reads rxNumBytes starting from location 'address' in buffer 2 and stores the data in t...
void dataflashBuffer2ReadHighFreq(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0xD6 Reads rxNumBytes starting from location 'address' in buffer 2 and stores the data in t...
void dataflashReadSecurityReg(uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x77 Reads 'rxNumBytes' bytes of data in from the security register.
void dataflashDisableSectorProtection()
OPCODE: 0x3D_2A_7F_9A Disables sector protection.
void dataflashProgramEraseSuspend()
OPCODE: 0xB0 Suspends a program or erase operation in progress to a particular 64KB sector of the m...
void dataflashAutoPageRewrite1(uint32_t address)
OPCODE: 0x58 Rewrite the page in main memory at address 'address.' This performs a refresh of stored ...
void dataflashAutoPageRewrite2(uint32_t address)
OPCODE: 0x59 Rewrite the page in main memory at address 'address.' This performs a refresh of stored ...
void dataflashBuffer1ReadHighFreq(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0xD4
void dataflashUDPDMode()
OPCODE: 0x79 Put the device into ultra deep power down mode. Wake the device with dataflashHardware...
void dataflashReadMID(uint8_t *rxBuffer)
OPCODE: 0x9F Reads the manufacturer ID and stores the data in rxBuffer.
void dataflashMemtoBuffer2Transfer(uint32_t address)
OPCODE: 0x55
void dataflashContinuousArrayReadLegacy(uint8_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x68 LEGACY: Reads rxNumBytes starting from location 'address' and stores the data in the b...
void dataflashDualInputBuffer2Write(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x24 Programs 'txNumBytes' bytes of data to buffer 2 starting at the address indicated by a...
void dataflashDualInputBuffer1Write(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x24 Programs 'txNumBytes' bytes of data to buffer 1 starting at the address indicated by a...
Declarations of spi_driver functions.
void dataflashBuffer1ToMainMemoryWithErase(uint32_t address)
OPCODE: 0x83 Programs the entire buffer 1 page to main memory starting at the address indicated by ...
void dataflashWaitOnReady()
: Wait while Read/Busy Status bit in SRB is 1 (device is busy).
void dataflashBuffer2Write(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x87 Programs 'txNumBytes' bytes of data to buffer 2 starting at the address indicated by a...
void dataflashBuffer1Write(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x84 Programs 'txNumBytes' bytes of data to buffer 1 starting at the address indicated by a...
void dataflashDPD()
OPCODE: 0xB9 Put the device into deep power down mode. Call dataflashResumeFromDPD() to wake up...
void dataflashResumeFromDPD()
OPCODE: 0xAB Wake the device from deep power down mode. See dataflashDPD().
void dataflashArrayReadLegacy(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0xE8 Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
void dataflashChipErase()
OPCODE: 0xC794_809A Erases the entire chip by setting all bits.
void dataflashMemoryProgramThruBuffer1WithoutErase(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x02
void dataflashMemtoBuffer2Compare(uint32_t address)
OPCODE: 0x61 Compare the contents of a page in main memory to the contents of buffer 2...
void dataflashReadConfigRegister(uint8_t *rxBuffer)
OPCODE: 0x3F Reads the configuration register and returns the 1-byte value in rxBuffer.
void dataflashQuadInputBuffer1Write(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x44 Programs 'txNumBytes' bytes of data to buffer 2 starting at the address indicated by a...
Declarations of helper functions.
void dataflashProgramEraseResume()
OPCODE: 0xD0 Resumes a suspended program or erase operation. See dataflashProgramEraseSuspend().
void dataflashSectorLockdown(uint32_t address)
OPCODE: 0x3D_2A_7F_30 Permanently a sector to prevent erasing or programming the stored data...
void dataflashReadSectorLockdownReg(uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x35 Reads 'rxNumBytes' bytes of data in from the SL register.
void dataflashBuffer1ToMainMemoryWithoutErase(uint32_t address)
OPCODE: 0x88 Programs the entire buffer 1 page to main memory starting at the address indicated by ...
void dataflashBlockErase(uint32_t address)
OPCODE: 0x50 Erases a block of data (8 pages) starting from page address 'address.'.
void dataflashRMWThruBuffer2(uint32_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x59 Reads main memory to buffer 1, modifies it, then writes the data back to main memory w...
void dataflashReadSectorProtectionReg(uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x32 Reads 'txNumBytes' bytes of data in from the SPR register.
void dataflashQuadOutputRead(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...
void dataflashConfigureStandardPageSize()
OPCODE: 0x3D_2A_80_A7 Configure the device to read and write with pages configured to 264 bytes...
void dataflashArrayReadHighFreq0(uint32_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x0B Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
void dataflashConfigurePower2PageSize()
OPCODE: 0x3D_2A_80_A6 Configure the device to read and write with pages configured to 256 bytes...
void dataflashEnableSectorProtection()
OPCODE: 0x3D_2A_7F_A9 Enables sector protection.