QSPI

This module implements a hardware Quad SPI master.

Details

define QSPI_VERSION

define QSPI_IOC_IDENT_CHAR

define I_QSPI_GETVERSION

define I_QSPI_GETINFO

define I_QSPI_SETATTR

define I_QSPI_SETACTION

define I_QSPI_EXECCOMMAND

define I_QSPI_TOTAL

enum qspi_flag_t
  • QSPI_FLAG_SET_MASTER Configure the QSPI as master
  • QSPI_FLAG_IS_CLOCK_MODE_0 Clock goes low while nCS is released, else high
  • QSPI_FLAG_IS_CLOCK_MODE_3 Clock goes high while nCS is released, else low
  • QSPI_FLAG_IS_FLASH_ID_2 use flash 2, else 1
  • QSPI_FLAG_IS_ADDRESS_8_BITS 8-bit address, default 32
  • QSPI_FLAG_IS_ADDRESS_16_BITS 16-bit address, default 32
  • QSPI_FLAG_IS_ADDRESS_24_BITS 24-bit address, default 32
  • QSPI_FLAG_IS_ADDRESS_32_BITS 24-bit address, default 32
  • QSPI_FLAG_IS_OPCODE_WRITE Write an opcode
  • QSPI_FLAG_IS_OPCODE_DUAL Use 2 lines for commands (default is 1 line)
  • QSPI_FLAG_IS_OPCODE_QUAD Use 4 lines for commands (default is 1 line)
  • QSPI_FLAG_IS_DATA_DUAL Use 2 lines for data
  • QSPI_FLAG_IS_DATA_QUAD Use 4 lines for data
  • QSPI_FLAG_EXECUTE_COMMAND Use with qspi_command_t in qspi_attr_t
  • QSPI_FLAG_IS_DATA_READ Command reads data from device
  • QSPI_FLAG_IS_DATA_WRITE Command write data to device
  • QSPI_FLAG_IS_ADDRESS_WRITE Write the address as part of the command
  • QSPI_FLAG_IS_ADDRESS_DUAL Use 2 lines for address (default is 1 line)
  • QSPI_FLAG_IS_ADDRESS_QUAD Use 4 lines for address (default is 1 line)

QSPI flags used with qspi_attr_t.o_flags and I_QSPI_SETATTR.


struct::qspi_info_t

u32 o_flags

Bitmask of supported flags

u32 o_events

Bitmask of supported events

u32 resd

struct::qspi_pin_assignment_t

mcu_pin_t data

Up to four data lines

mcu_pin_t sck

Serial clock pin

mcu_pin_t cs

Chip select pin


struct::qspi_command_t

u32 o_flags

Flags that affect the command

u16 opcode

The opcode to send to the device

u16 dummy_cycles

The number of dummy cycles to send

u32 address

If an address is used in the command it is assigned here.

u32 data_size

The number of data bytes to read or write

u8 data

The location of the data that is read or written


struct::qspi_attr_t

u32 o_flags

Flag bitmask

qspi_pin_assignment_t pin_assignment

Pin Assignment

u32 freq

Target operating frequency

u32 resd

X

Thanks for Coming!

Subscribe to news and updates