Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

HAL QSPI Generic Driver

 

UM1725

Function Name

HAL_StatusTypeDef HAL_QSPI_Abort (QSPI_HandleTypeDef *

 

hqspi)

Function Description

Abort the current transmission.

Parameters

 

hqspi: QSPI handle

Return values

 

HAL status

44.2.45HAL_QSPI_SetTimeout

Function Name

void HAL_QSPI_SetTimeout (QSPI_HandleTypeDef * hqspi,

 

uint32_t Timeout)

Function Description

Set QSPI timeout.

Parameters

 

hqspi: QSPI handle.

 

Timeout: Timeout for the QSPI memory access.

Return values

 

None

44.3QSPI Firmware driver defines

44.3.1

QSPI

 

 

QSPI Address Mode

 

 

QSPI_ADDRESS_NONE

No address

 

QSPI_ADDRESS_1_LINE

Address on a single line

 

QSPI_ADDRESS_2_LINES

Address on two lines

 

QSPI_ADDRESS_4_LINES

Address on four lines

 

QSPI Address Size

 

 

QSPI_ADDRESS_8_BITS

8-bit address

 

QSPI_ADDRESS_16_BITS

16-bit address

 

QSPI_ADDRESS_24_BITS

24-bit address

 

QSPI_ADDRESS_32_BITS

32-bit address

 

QSPI Alternate Bytes Mode

 

QSPI_ALTERNATE_BYTES_NONE QSPI_ALTERNATE_BYTES_1_LINE QSPI_ALTERNATE_BYTES_2_LINES QSPI_ALTERNATE_BYTES_4_LINES

QSPI Alternate Bytes Size

No alternate bytes

Alternate bytes on a single line Alternate bytes on two lines Alternate bytes on four lines

 

QSPI_ALTERNATE_BYTES_8_BITS

8-bit alternate bytes

 

QSPI_ALTERNATE_BYTES_16_BITS

16-bit alternate bytes

 

QSPI_ALTERNATE_BYTES_24_BITS

24-bit alternate bytes

 

QSPI_ALTERNATE_BYTES_32_BITS

32-bit alternate bytes

 

QSPI Automatic Stop

 

544/900

DOCID025834 Rev 2

UM1725

HAL QSPI Generic Driver

QSPI_AUTOMATIC_STOP_DISABLE

AutoPolling stops only with abort or QSPI

 

disabling

QSPI_AUTOMATIC_STOP_ENABLE

AutoPolling stops as soon as there is a match

QSPI Chip Select High Time

 

QSPI_CS_HIGH_TIME_1_CYCLE

nCS stay high for at least 1 clock cycle between

 

commands

QSPI_CS_HIGH_TIME_2_CYCLE

nCS stay high for at least 2 clock cycles between

 

commands

QSPI_CS_HIGH_TIME_3_CYCLE

nCS stay high for at least 3 clock cycles between

 

commands

QSPI_CS_HIGH_TIME_4_CYCLE

nCS stay high for at least 4 clock cycles between

 

commands

QSPI_CS_HIGH_TIME_5_CYCLE

nCS stay high for at least 5 clock cycles between

 

commands

QSPI_CS_HIGH_TIME_6_CYCLE

nCS stay high for at least 6 clock cycles between

 

commands

QSPI_CS_HIGH_TIME_7_CYCLE

nCS stay high for at least 7 clock cycles between

 

commands

QSPI_CS_HIGH_TIME_8_CYCLE

nCS stay high for at least 8 clock cycles between

 

commands

QSPI Clock Mode

 

QSPI_CLOCK_MODE_0 Clk stays low while nCS is released

QSPI_CLOCK_MODE_3 Clk goes high while nCS is released

QSPI Clock Prescaler

IS_QSPI_CLOCK_PRESCALER

QSPI Data Mode

QSPI_DATA_NONE QSPI_DATA_1_LINE QSPI_DATA_2_LINES QSPI_DATA_4_LINES

No data

Data on a single line Data on two lines Data on four lines

QSPI Ddr HoldHalfCycle

 

QSPI_DDR_HHC_ANALOG_DELAY

Delay the data output using analog delay in DDR

 

mode

QSPI_DDR_HHC_HALF_CLK_DELAY

Delay the data output by 1/2 clock cycle in DDR

 

mode

QSPI Ddr Mode

 

 

QSPI_DDR_MODE_DISABLE

Double data rate mode disabled

 

QSPI_DDR_MODE_ENABLE

Double data rate mode enabled

 

QSPI Dual Flash Mode

 

 

QSPI_DUALFLASH_ENABLE

 

 

DOCID025834 Rev 2

545/900

HAL QSPI Generic Driver

UM1725

QSPI_DUALFLASH_DISABLE

 

QSPI Dummy Cycles

 

IS_QSPI_DUMMY_CYCLES

 

QSPI Error Code

 

HAL_QSPI_ERROR_NONE

No error

HAL_QSPI_ERROR_TIMEOUT

Timeout error

HAL_QSPI_ERROR_TRANSFER

Transfer error

HAL_QSPI_ERROR_DMA

DMA transfer error

QSPI Exported Macros

 

__HAL_QSPI_RESET_HANDLE_STATE Description:

Reset QSPI handle state.

Parameters:

__HANDLE__: QSPI handle.

Return value:

 

 

None

__HAL_QSPI_ENABLE

Description:

 

 

Enable QSPI.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

Return value:

 

 

None

__HAL_QSPI_DISABLE

Description:

 

 

Disable QSPI.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

Return value:

 

 

None

__HAL_QSPI_ENABLE_IT

Description:

 

Enables the specified QSPI interrupt.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

__INTERRUPT__: specifies the QSPI

 

 

interrupt source to enable. This parameter

 

 

can be one of the following values:

 

 

QSPI_IT_TO: QSPI Time out

 

 

interrupt

 

 

QSPI_IT_SM: QSPI Status match

 

 

interrupt

 

 

QSPI_IT_FT: QSPI FIFO threshold

546/900

DOCID025834 Rev 2

UM1725

HAL QSPI Generic Driver

 

interrupt

 

QSPI_IT_TC: QSPI Transfer

 

complete interrupt

 

QSPI_IT_TE: QSPI Transfer error

 

interrupt

 

Return value:

 

 

None

__HAL_QSPI_DISABLE_IT

Description:

 

Disables the specified QSPI interrupt.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

__INTERRUPT__: specifies the QSPI

 

 

interrupt source to disable. This parameter

 

 

can be one of the following values:

 

 

 

QSPI_IT_TO: QSPI Timeout interrupt

 

 

 

QSPI_IT_SM: QSPI Status match

 

 

 

interrupt

 

 

 

QSPI_IT_FT: QSPI FIFO threshold

 

 

 

interrupt

 

 

 

QSPI_IT_TC: QSPI Transfer

 

 

 

complete interrupt

 

 

 

QSPI_IT_TE: QSPI Transfer error

 

 

 

interrupt

 

Return value:

 

 

None

__HAL_QSPI_GET_IT_SOURCE

Description:

 

Checks whether the specified QSPI

 

 

interrupt source is enabled.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

__INTERRUPT__: specifies the QSPI

 

 

interrupt source to check. This parameter

 

 

can be one of the following values:

 

 

 

QSPI_IT_TO: QSPI Time out

 

 

 

interrupt

 

 

 

QSPI_IT_SM: QSPI Status match

 

 

 

interrupt

 

 

 

QSPI_IT_FT: QSPI FIFO threshold

 

 

 

interrupt

 

 

 

QSPI_IT_TC: QSPI Transfer

 

 

 

complete interrupt

 

 

 

QSPI_IT_TE: QSPI Transfer error

 

 

 

interrupt

 

Return value:

 

The: new state of __INTERRUPT__

 

 

(TRUE or FALSE).

DOCID025834 Rev 2

547/900

HAL QSPI Generic Driver

 

UM1725

__HAL_QSPI_GET_FLAG

Description:

 

Get the selected QSPI's flag status.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

__FLAG__: specifies the QSPI flag to

 

 

check. This parameter can be one of the

 

 

following values:

 

 

QSPI_FLAG_BUSY: QSPI Busy flag

 

 

QSPI_FLAG_TO: QSPI Time out flag

 

 

QSPI_FLAG_SM: QSPI Status match

 

 

flag

 

 

QSPI_FLAG_FT: QSPI FIFO

 

 

threshold flag

 

 

QSPI_FLAG_TC: QSPI Transfer

 

 

complete flag

 

 

QSPI_FLAG_TE: QSPI Transfer error

 

 

flag

 

Return value:

 

 

None

__HAL_QSPI_CLEAR_FLAG

Description:

 

Clears the specified QSPI's flag status.

 

Parameters:

 

__HANDLE__: specifies the QSPI Handle.

 

__FLAG__: specifies the QSPI clear

 

 

register flag that needs to be set This

 

 

parameter can be one of the following

 

 

values:

 

 

QSPI_FLAG_TO: QSPI Time out flag

 

 

QSPI_FLAG_SM: QSPI Status match

 

 

flag

 

 

QSPI_FLAG_TC: QSPI Transfer

 

 

complete flag

 

 

QSPI_FLAG_TE: QSPI Transfer error

 

 

flag

 

Return value:

 

 

None

QSPI Fifo Threshold

IS_QSPI_FIFO_THRESHOLD

QSPI Flags

 

QSPI_FLAG_BUSY

Busy flag: operation is ongoing

QSPI_FLAG_TO

Timeout flag: timeout occurs in memory-mapped mode

QSPI_FLAG_SM

Status match flag: received data matches in autopolling mode

QSPI_FLAG_FT

Fifo threshold flag: Fifo threshold reached or data left after read

 

from memory is complete

548/900

DOCID025834 Rev 2

UM1725

HAL QSPI Generic Driver

QSPI_FLAG_TC

Transfer complete flag: programmed number of data have been

 

transferred or the transfer has been aborted

QSPI_FLAG_TE

Transfer error flag: invalid address is being accessed

QSPI Flash Size

IS_QSPI_FLASH_SIZE

QSPI Flash Select

QSPI_FLASH_ID_1

QSPI_FLASH_ID_2

QSPI Instruction

IS_QSPI_INSTRUCTION

QSPI Instruction Mode

QSPI_INSTRUCTION_NONE QSPI_INSTRUCTION_1_LINE QSPI_INSTRUCTION_2_LINES QSPI_INSTRUCTION_4_LINES

QSPI Interrupts

No instruction

Instruction on a single line Instruction on two lines Instruction on four lines

QSPI_IT_TO QSPI_IT_SM QSPI_IT_FT QSPI_IT_TC QSPI_IT_TE

Interrupt on the timeout flag Interrupt on the status match flag Interrupt on the fifo threshold flag

Interrupt on the transfer complete flag Interrupt on the transfer error flag

QSPI Interval

 

IS_QSPI_INTERVAL

 

QSPI Match Mode

 

QSPI_MATCH_MODE_AND

AND match mode between unmasked bits

QSPI_MATCH_MODE_OR

OR match mode between unmasked bits

QSPI Private Constants

QSPI_FUNCTIONAL_MODE_INDIRECT_WRITE QSPI_FUNCTIONAL_MODE_INDIRECT_READ QSPI_FUNCTIONAL_MODE_AUTO_POLLING QSPI_FUNCTIONAL_MODE_MEMORY_MAPPED

QSPI Private Macros

IS_QSPI_FUNCTIONAL_MODE

IS_QSPI_SSHIFT

IS_QSPI_CS_HIGH_TIME

IS_QSPI_CLOCK_MODE

IS_QSPI_FLASH_ID

Indirect write mode Indirect read mode Automatic polling mode Memory-mapped mode

DOCID025834 Rev 2

549/900

HAL QSPI Generic Driver

UM1725

IS_QSPI_DUAL_FLASH_MODE

 

IS_QSPI_ADDRESS_SIZE

 

IS_QSPI_ALTERNATE_BYTES_SIZE

 

IS_QSPI_INSTRUCTION_MODE

 

IS_QSPI_ADDRESS_MODE

 

IS_QSPI_ALTERNATE_BYTES_MODE

 

IS_QSPI_DATA_MODE

 

IS_QSPI_DDR_MODE

 

IS_QSPI_DDR_HHC

 

IS_QSPI_SIOO_MODE

 

IS_QSPI_MATCH_MODE

 

IS_QSPI_AUTOMATIC_STOP

 

IS_QSPI_TIMEOUT_ACTIVATION

 

IS_QSPI_GET_FLAG

 

IS_QSPI_IT

 

QSPI Sample Shifting

 

QSPI_SAMPLE_SHIFTING_NONE

No clock cycle shift to sample data

QSPI_SAMPLE_SHIFTING_HALFCYCLE

1/2 clock cycle shift to sample data

QSPI SIOO Mode

 

QSPI_SIOO_INST_EVERY_CMD

Send instruction on every transaction

QSPI_SIOO_INST_ONLY_FIRST_CMD

Send instruction only for the first command

QSPI Status Bytes Size

 

IS_QSPI_STATUS_BYTES_SIZE

 

QSPI TimeOut Activation

 

QSPI_TIMEOUT_COUNTER_DISABLE

Timeout counter disabled, nCS remains active

QSPI_TIMEOUT_COUNTER_ENABLE

Timeout counter enabled, nCS released when

 

timeout expires

QSPI TimeOut Period

 

IS_QSPI_TIMEOUT_PERIOD

 

QSPI Timeout definition

HAL_QPSI_TIMEOUT_DEFAULT_VALUE

550/900

DOCID025834 Rev 2

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]