Qspi#
- group bsp_qspi
Control the QSPI flash peripheral.
- Author
Alexandre Abadie alexandre.abadie@inria.fr
- Copyright
Inria, 2024-present
Defines
-
DB_QSPI_SCKFREQ_32MHZ#
-
DB_QSPI_SCKFREQ_16MHZ#
-
DB_QSPI_SCKFREQ_8MHZ#
-
DB_QSPI_SCKFREQ_4MHZ#
-
DB_QSPI_SCKFREQ_2MHZ#
-
DB_QSPI_SCKFREQ_1MHZ#
Enums
-
enum db_qspi_mode_t#
SPIM mode.
Values:
-
enumerator DB_SPIM_MODE_0#
CPOL = 0 (Active High), CPHA = 0 (Leading)
-
enumerator DB_SPIM_MODE_1#
CPOL = 0 (Active High), CPHA = 1 (Trailing)
-
enumerator DB_SPIM_MODE_2#
CPOL = 1 (Active Low), CPHA = 0 (Leading)
-
enumerator DB_SPIM_MODE_3#
CPOL = 1 (Active Low), CPHA = 1 (Trailing)
-
enumerator DB_SPIM_MODE_0#
Functions
-
void db_qspi_init(const db_qspi_conf_t *conf)#
Initialize the QSPI peripheral.
- Parameters:
conf – [in] pointer to configuration struct
-
void db_qspi_read(const uint32_t addr, void *in, size_t len)#
Read bytes from flash.
- Parameters:
addr – [in] 24bit address
in – [in] Pointer to the incoming bytes
len – [in] Length of the bytes to send
-
void db_qspi_program(const uint32_t addr, const void *out, size_t len)#
Program bytes on flash.
- Parameters:
addr – [in] 24bit address
out – [in] Pointer to the output bytes
len – [in] Length of the bytes to receive
-
void db_qspi_block_erase(const uint32_t addr)#
Erase page/blocks of flash.
- Parameters:
addr – [in] 24bit address
-
void db_qspi_bulk_erase(void)#
Erase all flash.
-
struct db_qspi_conf_t#
SPIM pin configuration.