![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Modules | |
IP: SPIFI programming options | |
Data Structures | |
struct | SPIFI_RTNS |
Macros | |
#define | NO_OPCODE_FOLLOWS 0xA5 |
#define | OPCODE_FOLLOWS 0xFF |
#define | BASE_READ_CMD (CMD_RD << OPCODE_SHIFT | 4 << FRAMEFORM_SHIFT | UNL_DATA) |
#define | FAST_READ_CMD (CMD_READ_FAST << OPCODE_SHIFT | 4 << FRAMEFORM_SHIFT | 1 << INTLEN_SHIFT | UNL_DATA) |
#define | BASE_PROG_CMD (CMD_PROG << OPCODE_SHIFT | 4 << FRAMEFORM_SHIFT | DOUT) |
#define | PROG_SIZE 256 |
#define | OPT_SEND_A3 1 |
#define | OPT_SEND_38 2 |
#define | OPT_35_OR02_01 4 |
#define | OPT_3F_OR80_3E 8 |
#define | OPT_65_CLR_C0_61 0x10 |
#define | OPT_81 0x20 |
#define | OPT_NO_DEV_ERASE 0x40 |
#define | OPT_WPSEL 0x80 |
#define | OPT_PROT_READ 0x100 |
#define | OPT_4BAD 0x200 |
#define | OPT_DUAL 0x400 |
#define | OPT_C0 0x800 |
#define | OPT_05_OR40_01 0x1000 |
#define | OPT_01_NO_BUSY 0x2000 |
#define | OPT_PROT_STAT 0x4000 |
#define | OPT_PROT_REG 0x8000 |
#define | OPT_PROT_CMD3 0x10000 |
#define | OPT_PROT_CMDE 0x20000 |
#define | OPT_PROT_MASK 0x3C000 |
#define | OPT_ALL_QUAD 0x40000 |
#define | SPIFI_ROM_PTR 0x10400118 |
#define | define_spifi_romPtr(name) const SPIFI_RTNS * name = *((SPIFI_RTNS * *) SPIFI_ROM_PTR) |
Functions | |
int32_t | spifi_init (SPIFIobj *obj, uint32_t csHigh, uint32_t options, uint32_t mhz) |
int32_t | spifi_program (SPIFIobj *obj, char *source, SPIFIopers *opers) |
int32_t | spifi_erase (SPIFIobj *obj, SPIFIopers *opers) |
void | setSize (SPIFIobj *obj, int32_t value) |
int32_t | setDev (SPIFIobj *obj, uint32_t opts, uint32_t mem_cmd, uint32_t prog_cmd) |
uint32_t | read04 (SPIFIobj *obj, uc op, uc len) |
int32_t | write_stat (SPIFIobj *obj, uc len, uint16_t value) |
void | setProtEnts (SPIFIobj *obj, const protEnt *p, uint32_t protTabLen) |
void | pullMISO (int high) |
#define | S_MODE3 1 |
#define | S_MODE0 0 |
#define | S_MINIMAL 2 |
#define | S_MAXIMAL 0 |
#define | S_RCVCLK 0x80 |
#define | S_INTCLK 0 |
#define | S_FULLCLK 0x40 |
#define | S_HALFCLK 0 |
#define | S_DUAL 0x100 |
Options used to configure SPIFI
#define BASE_PROG_CMD (CMD_PROG << OPCODE_SHIFT | 4 << FRAMEFORM_SHIFT | DOUT) |
Definition at line 201 of file spifi_rom_api.h.
#define BASE_READ_CMD (CMD_RD << OPCODE_SHIFT | 4 << FRAMEFORM_SHIFT | UNL_DATA) |
Definition at line 199 of file spifi_rom_api.h.
#define define_spifi_romPtr | ( | name | ) | const SPIFI_RTNS * name = *((SPIFI_RTNS * *) SPIFI_ROM_PTR) |
Definition at line 284 of file spifi_rom_api.h.
#define FAST_READ_CMD (CMD_READ_FAST << OPCODE_SHIFT | 4 << FRAMEFORM_SHIFT | 1 << INTLEN_SHIFT | UNL_DATA) |
Definition at line 200 of file spifi_rom_api.h.
#define NO_OPCODE_FOLLOWS 0xA5 |
Definition at line 195 of file spifi_rom_api.h.
#define OPCODE_FOLLOWS 0xFF |
Definition at line 196 of file spifi_rom_api.h.
#define OPT_01_NO_BUSY 0x2000 |
Definition at line 237 of file spifi_rom_api.h.
#define OPT_05_OR40_01 0x1000 |
Definition at line 235 of file spifi_rom_api.h.
#define OPT_35_OR02_01 4 |
Definition at line 213 of file spifi_rom_api.h.
#define OPT_3F_OR80_3E 8 |
Definition at line 215 of file spifi_rom_api.h.
#define OPT_4BAD 0x200 |
Definition at line 229 of file spifi_rom_api.h.
#define OPT_65_CLR_C0_61 0x10 |
Definition at line 217 of file spifi_rom_api.h.
#define OPT_81 0x20 |
Definition at line 220 of file spifi_rom_api.h.
#define OPT_ALL_QUAD 0x40000 |
Definition at line 245 of file spifi_rom_api.h.
#define OPT_C0 0x800 |
Definition at line 233 of file spifi_rom_api.h.
#define OPT_DUAL 0x400 |
Definition at line 231 of file spifi_rom_api.h.
#define OPT_NO_DEV_ERASE 0x40 |
Definition at line 222 of file spifi_rom_api.h.
#define OPT_PROT_CMD3 0x10000 |
Definition at line 241 of file spifi_rom_api.h.
#define OPT_PROT_CMDE 0x20000 |
Definition at line 242 of file spifi_rom_api.h.
#define OPT_PROT_MASK 0x3C000 |
Definition at line 243 of file spifi_rom_api.h.
#define OPT_PROT_READ 0x100 |
Definition at line 227 of file spifi_rom_api.h.
#define OPT_PROT_REG 0x8000 |
Definition at line 240 of file spifi_rom_api.h.
#define OPT_PROT_STAT 0x4000 |
Definition at line 239 of file spifi_rom_api.h.
#define OPT_SEND_38 2 |
Definition at line 210 of file spifi_rom_api.h.
#define OPT_SEND_A3 1 |
Definition at line 208 of file spifi_rom_api.h.
#define OPT_WPSEL 0x80 |
Definition at line 225 of file spifi_rom_api.h.
#define PROG_SIZE 256 |
Definition at line 204 of file spifi_rom_api.h.
#define S_DUAL 0x100 |
If the connected device can operate in dual mode (2 bits per clock), dual mode will be used, else SPI mode.
Definition at line 150 of file spifi_rom_api.h.
#define S_FULLCLK 0x40 |
Data from the serial flash is sampled on falling edges on the SCL output, allowing a full clock period for the serial flash to present each bit or group of bits.
Definition at line 142 of file spifi_rom_api.h.
#define S_HALFCLK 0 |
Data from the serial flash is sampled on rising edges of the SCL output, as in classic SPI applications. Suitable for slower clock rates. (default)
Definition at line 146 of file spifi_rom_api.h.
#define S_INTCLK 0 |
Data is sampled using the internal clock from which the SCL pin is driven. (default)
Definition at line 137 of file spifi_rom_api.h.
#define S_MAXIMAL 0 |
The fastest read operation provided by the device will be used. (default)
Definition at line 128 of file spifi_rom_api.h.
#define S_MINIMAL 2 |
SPI mode and the slowest, most basic/compatible read operation will be used.
Definition at line 125 of file spifi_rom_api.h.
#define S_MODE0 0 |
SCL is low when a frame/command is not in progress. (default)
Definition at line 122 of file spifi_rom_api.h.
#define S_MODE3 1 |
The SCL output is high when a frame/command is not in progress. Note that S_MODE3+S_FULLCLK+S_RCVCLK will not work. Use S_MODE0 or S_INTCLK.
Definition at line 119 of file spifi_rom_api.h.
#define S_RCVCLK 0x80 |
Data is sampled using the SCL clock fed back from the pin. This allows more time for the serial flash to present each bit or group of bits, but when used with S_FULLCLK can endanger hold time for data from the flash.
Definition at line 134 of file spifi_rom_api.h.
#define SPIFI_ROM_PTR 0x10400118 |
Definition at line 282 of file spifi_rom_api.h.
void pullMISO | ( | int | high | ) |
void setSize | ( | SPIFIobj * | obj, |
int32_t | value | ||
) |
int32_t spifi_erase | ( | SPIFIobj * | obj, |
SPIFIopers * | opers | ||
) |
int32_t spifi_program | ( | SPIFIobj * | obj, |
char * | source, | ||
SPIFIopers * | opers | ||
) |