flash2 2.0.0.0

Topics

 MikroBUS
 
 Error Code
 

Macros

#define FLASH2_STATUS_WEL   0x02
 
#define FLASH2_STATUS_WSE   0x04
 
#define FLASH2_STATUS_WSP   0x08
 
#define FLASH2_STATUS_WPLD   0x10
 
#define FLASH2_STATUS_SEC   0x20
 
#define FLASH2_STATUS_RES   0x40
 
#define FLASH2_STATUS_BUSY   0x80
 
#define FLASH2_CFG_RES   0x01
 
#define FLASH2_CFG_IOC   0x02
 
#define FLASH2_CFG_BPNV   0x08
 
#define FLASH2_CFG_WPEN   0x80
 
#define FLASH2_INSTR_NOP   0x00
 
#define FLASH2_INSTR_RSTEN   0x66
 
#define FLASH2_INSTR_RST   0x99
 
#define FLASH2_INSTR_EQIO   0x38
 
#define FLASH2_INSTR_RSTQIO   0xFF
 
#define FLASH2_INSTR_RDSR   0x05
 
#define FLASH2_INSTR_WRSR   0x01
 
#define FLASH2_INSTR_RDCR   0x35
 
#define FLASH2_INSTR_READ   0x03
 
#define FLASH2_INSTR_HS_READ   0x0B
 
#define FLASH2_INSTR_SQOR   0x6B
 
#define FLASH2_INSTR_SQIOR   0xEB
 
#define FLASH2_INSTR_SDOR   0x3B
 
#define FLASH2_INSTR_SDIOR   0xBB
 
#define FLASH2_INSTR_SB   0xC0
 
#define FLASH2_INSTR_RBSQI   0x0C
 
#define FLASH2_INSTR_RBSPI   0xEC
 
#define FLASH2_INSTR_JEDECID   0x9F
 
#define FLASH2_INSTR_QUAD_JID   0xAF
 
#define FLASH2_INSTR_SFDP   0x5A
 
#define FLASH2_INSTR_WREN   0x06
 
#define FLASH2_INSTR_WRDI   0x04
 
#define FLASH2_INSTR_SE   0x20
 
#define FLASH2_INSTR_BE   0xD8
 
#define FLASH2_INSTR_CE   0xC7
 
#define FLASH2_INSTR_PP   0x02
 
#define FLASH2_INSTR_SPI_QUAD   0x32
 
#define FLASH2_INSTR_WRSU   0xB0
 
#define FLASH2_INSTR_WRRE   0x30
 
#define FLASH2_INSTR_RBPR   0x72
 
#define FLASH2_INSTR_WBPR   0x42
 
#define FLASH2_INSTR_LBPR   0x8D
 
#define FLASH2_INSTR_NVWLDR   0xE8
 
#define FLASH2_INSTR_ULBPR   0x98
 
#define FLASH2_INSTR_RSID   0x88
 
#define FLASH2_INSTR_PSID   0xA5
 
#define FLASH2_INSTR_LSID   0x85
 
#define FLASH2_START_PAGE_ADDRESS   0x010000
 
#define FLASH2_END_PAGE_ADDRESS   0x7FFFFF
 
#define FLASH2_FLASH_PAGE_SIZE   256
 

Detailed Description

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Macro Definition Documentation

◆ FLASH2_CFG_BPNV

#define FLASH2_CFG_BPNV   0x08

◆ FLASH2_CFG_IOC

#define FLASH2_CFG_IOC   0x02

◆ FLASH2_CFG_RES

#define FLASH2_CFG_RES   0x01

◆ FLASH2_CFG_WPEN

#define FLASH2_CFG_WPEN   0x80

◆ FLASH2_END_PAGE_ADDRESS

#define FLASH2_END_PAGE_ADDRESS   0x7FFFFF

◆ FLASH2_FLASH_PAGE_SIZE

#define FLASH2_FLASH_PAGE_SIZE   256

◆ FLASH2_INSTR_BE

#define FLASH2_INSTR_BE   0xD8

Erase 64, 32 or 8 KBytes of Memory Array

◆ FLASH2_INSTR_CE

#define FLASH2_INSTR_CE   0xC7

Erase Full Array

◆ FLASH2_INSTR_EQIO

#define FLASH2_INSTR_EQIO   0x38

Enable Quad I/O

◆ FLASH2_INSTR_HS_READ

#define FLASH2_INSTR_HS_READ   0x0B

Read Memory at Higher Speed

◆ FLASH2_INSTR_JEDECID

#define FLASH2_INSTR_JEDECID   0x9F

JEDEC-ID Read

◆ FLASH2_INSTR_LBPR

#define FLASH2_INSTR_LBPR   0x8D

Lock Down Block-Protection Register

◆ FLASH2_INSTR_LSID

#define FLASH2_INSTR_LSID   0x85

Lockout Security ID Programming

◆ FLASH2_INSTR_NOP

#define FLASH2_INSTR_NOP   0x00

No Operation

◆ FLASH2_INSTR_NVWLDR

#define FLASH2_INSTR_NVWLDR   0xE8

Non-Volatile Write Lock-Down Register

◆ FLASH2_INSTR_PP

#define FLASH2_INSTR_PP   0x02

Page Program

◆ FLASH2_INSTR_PSID

#define FLASH2_INSTR_PSID   0xA5

Program User Security ID Area

◆ FLASH2_INSTR_QUAD_JID

#define FLASH2_INSTR_QUAD_JID   0xAF

Quad I/O J-ID read

◆ FLASH2_INSTR_RBPR

#define FLASH2_INSTR_RBPR   0x72

Read Block-Protection Register

◆ FLASH2_INSTR_RBSPI

#define FLASH2_INSTR_RBSPI   0xEC

SPI Read Burst with Wrap

◆ FLASH2_INSTR_RBSQI

#define FLASH2_INSTR_RBSQI   0x0C

SQI Read Burst with Wrap

◆ FLASH2_INSTR_RDCR

#define FLASH2_INSTR_RDCR   0x35

Read Configuration Register

◆ FLASH2_INSTR_RDSR

#define FLASH2_INSTR_RDSR   0x05

Read Status Register

◆ FLASH2_INSTR_READ

#define FLASH2_INSTR_READ   0x03

Read Memory

◆ FLASH2_INSTR_RSID

#define FLASH2_INSTR_RSID   0x88

Read Security ID

◆ FLASH2_INSTR_RST

#define FLASH2_INSTR_RST   0x99

Reset Memory

◆ FLASH2_INSTR_RSTEN

#define FLASH2_INSTR_RSTEN   0x66

Reset Enable

◆ FLASH2_INSTR_RSTQIO

#define FLASH2_INSTR_RSTQIO   0xFF

Reset Quad I/O

◆ FLASH2_INSTR_SB

#define FLASH2_INSTR_SB   0xC0

Set Burst Length

◆ FLASH2_INSTR_SDIOR

#define FLASH2_INSTR_SDIOR   0xBB

SPI Dual I/O Read

◆ FLASH2_INSTR_SDOR

#define FLASH2_INSTR_SDOR   0x3B

SPI Dual Output Read

◆ FLASH2_INSTR_SE

#define FLASH2_INSTR_SE   0x20

Erase 4 KBytes of Memory Array

◆ FLASH2_INSTR_SFDP

#define FLASH2_INSTR_SFDP   0x5A

Serial Flash Discoverable Parameters

◆ FLASH2_INSTR_SPI_QUAD

#define FLASH2_INSTR_SPI_QUAD   0x32

SQI Quad Page Program

◆ FLASH2_INSTR_SQIOR

#define FLASH2_INSTR_SQIOR   0xEB

SPI Quad I/O Read

◆ FLASH2_INSTR_SQOR

#define FLASH2_INSTR_SQOR   0x6B

SPI Quad Output Read

◆ FLASH2_INSTR_ULBPR

#define FLASH2_INSTR_ULBPR   0x98

Global Block Protection Unlock

◆ FLASH2_INSTR_WBPR

#define FLASH2_INSTR_WBPR   0x42

Write Block-Protection Register

◆ FLASH2_INSTR_WRDI

#define FLASH2_INSTR_WRDI   0x04

Write Disable

◆ FLASH2_INSTR_WREN

#define FLASH2_INSTR_WREN   0x06

Write Enable

◆ FLASH2_INSTR_WRRE

#define FLASH2_INSTR_WRRE   0x30

Resumes Program / Erase

◆ FLASH2_INSTR_WRSR

#define FLASH2_INSTR_WRSR   0x01

Write Status Register

◆ FLASH2_INSTR_WRSU

#define FLASH2_INSTR_WRSU   0xB0

Suspends Program / Erase

◆ FLASH2_START_PAGE_ADDRESS

#define FLASH2_START_PAGE_ADDRESS   0x010000

◆ FLASH2_STATUS_BUSY

#define FLASH2_STATUS_BUSY   0x80

◆ FLASH2_STATUS_RES

#define FLASH2_STATUS_RES   0x40

◆ FLASH2_STATUS_SEC

#define FLASH2_STATUS_SEC   0x20

◆ FLASH2_STATUS_WEL

#define FLASH2_STATUS_WEL   0x02

◆ FLASH2_STATUS_WPLD

#define FLASH2_STATUS_WPLD   0x10

◆ FLASH2_STATUS_WSE

#define FLASH2_STATUS_WSE   0x04

◆ FLASH2_STATUS_WSP

#define FLASH2_STATUS_WSP   0x08