MG32F157 Standard Peripherals Firmware Library
|
Functions | |
void | QSPI_StructInit (QSPI_InitTypeDef *QSPI_InitStruct) |
Fills each QSPI_InitStruct member with its default value. More... | |
void | QSPI_ComConfig_StructInit (QSPI_ComConfig_InitTypeDef *QSPI_ComConfig_InitStruct) |
Fills each QSPI_ComConfig_InitStruct member with its default value. More... | |
void | QSPI_Init (QSPI_InitTypeDef *QSPI_InitStruct) |
Initializes the QSPI peripheral according to the specified parameters in the QSPI_InitStruct. More... | |
void | QSPI_ComConfig_Init (QSPI_ComConfig_InitTypeDef *QSPI_ComConfig_InitStruct) |
Initializes the QSPI CCR according to the specified parameters in the QSPI_ComConfig_InitStruct. More... | |
void | QSPI_Cmd (FunctionalState NewState) |
Enables or disables QSPI peripheral. More... | |
void | QSPI_AutoPollingMode_Config (uint32_t QSPI_Match, uint32_t QSPI_Mask, uint32_t QSPI_Match_Mode) |
Configure the QSPI Automatic Polling Mode. More... | |
void | QSPI_AutoPollingMode_SetInterval (uint32_t QSPI_Interval) |
Sets the number of CLK cycle between two read during automatic polling phases. More... | |
void | QSPI_MemoryMappedMode_SetTimeout (uint32_t QSPI_Timeout) |
Sets the value of the Timeout in Memory Mapped mode. More... | |
void | QSPI_SetAddress (uint32_t QSPI_Address) |
Sets the value of the Address. More... | |
void | QSPI_SetAlternateByte (uint32_t QSPI_AlternateByte) |
Sets the value of the Alternate Bytes. More... | |
void | QSPI_SetFIFOThreshold (uint32_t QSPI_FIFOThreshold) |
Sets the FIFO Threshold. More... | |
void | QSPI_SetDataLength (uint32_t QSPI_DataLength) |
Sets number of Bytes to be transferred. More... | |
void | QSPI_TimeoutCounterCmd (FunctionalState NewState) |
Enables or disables The Timeout Counter. More... | |
void | QSPI_AutoPollingModeStopCmd (FunctionalState NewState) |
Enables or disables Automatic Polling Mode Stop when a match occurs. More... | |
void | QSPI_AbortRequest (void) |
Abort the on-going command sequence. More... | |
void | QSPI_SendData8 (uint8_t Data) |
Transmits a 8bit Data through the QSPI peripheral. More... | |
void | QSPI_SendData16 (uint16_t Data) |
Transmits a 16bit Data through the QSPI peripheral. More... | |
void | QSPI_SendData32 (uint32_t Data) |
Transmits a 32bit Data through the QSPI peripheral. More... | |
uint8_t | QSPI_ReceiveData8 (void) |
Returns the most recent received 8bit data by the QSPI peripheral. More... | |
uint16_t | QSPI_ReceiveData16 (void) |
Returns the most recent received 16bit data by the QSPI peripheral. More... | |
uint32_t | QSPI_ReceiveData32 (void) |
Returns the most recent received 32bit data by the QSPI peripheral. More... | |
void | QSPI_DMACmd (FunctionalState NewState) |
Enables or disables DMA for Indirect Mode. More... | |
void | QSPI_ITConfig (uint32_t QSPI_IT, FunctionalState NewState) |
Enables or disables the specified QSPI interrupts. More... | |
uint32_t | QSPI_GetFIFOLevel (void) |
Returns the current QSPI FIFO filled level. More... | |
uint32_t | QSPI_GetFMode (void) |
Returns the QSPI functional mode. More... | |
FlagStatus | QSPI_GetFlagStatus (uint32_t QSPI_FLAG) |
Checks whether the specified QSPI flag is set or not. More... | |
void | QSPI_ClearFlag (uint32_t QSPI_FLAG) |
Clears the QSPI flag. More... | |
ITStatus | QSPI_GetITStatus (uint32_t QSPI_IT) |
Checks whether the specified QSPI interrupt has occurred or not. More... | |
void | QSPI_ClearITPendingBit (uint32_t QSPI_IT) |
Clears the QSPI's interrupt pending bits. More... | |
void | QSPI_DualFlashMode_Cmd (FunctionalState NewState) |
Enables or disables QSPI Dual Flash Mode. More... | |
void QSPI_AbortRequest | ( | void | ) |
Abort the on-going command sequence.
None |
void QSPI_AutoPollingMode_Config | ( | uint32_t | QSPI_Match, |
uint32_t | QSPI_Mask, | ||
uint32_t | QSPI_Match_Mode | ||
) |
Configure the QSPI Automatic Polling Mode.
QSPI_Match | Value to be compared with the masked status register to get a match. This parameter can be any value between 0x00000000 and 0xFFFFFFFF. |
QSPI_Mask | Mask to be applied to the status bytes received in polling mode.. This parameter can be any value between 0x00000000 and 0xFFFFFFFF. |
QSPI_Match_Mode | indicates which method should be used for determining a match during automatic polling mode. This parameter can be any value of :
|
void QSPI_AutoPollingMode_SetInterval | ( | uint32_t | QSPI_Interval | ) |
Sets the number of CLK cycle between two read during automatic polling phases.
QSPI_Interval | The number of CLK cycle between two read during automatic polling phases. This parameter can be any value of between 0x0000 and 0xFFFF |
void QSPI_AutoPollingModeStopCmd | ( | FunctionalState | NewState | ) |
Enables or disables Automatic Polling Mode Stop when a match occurs.
NewState | new state of the Automatic Polling Mode Stop. This parameter can be: ENABLE or DISABLE. |
void QSPI_ClearFlag | ( | uint32_t | QSPI_FLAG | ) |
Clears the QSPI flag.
QSPI_FLAG | specifies the QSPI flag to clear. This parameter can be one of the following values:
|
void QSPI_ClearITPendingBit | ( | uint32_t | QSPI_IT | ) |
Clears the QSPI's interrupt pending bits.
QSPI_IT | specifies the QSPI pending bit to clear. This parameter can be one of the following values:
|
void QSPI_Cmd | ( | FunctionalState | NewState | ) |
Enables or disables QSPI peripheral.
NewState | new state of the QSPI peripheral. This parameter can be: ENABLE or DISABLE. |
void QSPI_ComConfig_Init | ( | QSPI_ComConfig_InitTypeDef * | QSPI_ComConfig_InitStruct | ) |
Initializes the QSPI CCR according to the specified parameters in the QSPI_ComConfig_InitStruct.
QSPI_ComConfig_InitStruct | pointer to a QSPI_ComConfig_InitTypeDef structure that contains the communication configuration informations about QSPI peripheral. |
void QSPI_ComConfig_StructInit | ( | QSPI_ComConfig_InitTypeDef * | QSPI_ComConfig_InitStruct | ) |
Fills each QSPI_ComConfig_InitStruct member with its default value.
QSPI_ComConfig_InitStruct | pointer to a QSPI_ComConfig_InitTypeDef structure which will be initialized. |
void QSPI_DMACmd | ( | FunctionalState | NewState | ) |
Enables or disables DMA for Indirect Mode.
NewState | new state of the Timeout Counter. This parameter can be: ENABLE or DISABLE. |
void QSPI_DualFlashMode_Cmd | ( | FunctionalState | NewState | ) |
Enables or disables QSPI Dual Flash Mode.
NewState | new state of the QSPI Dual Flash Mode. This parameter can be: ENABLE or DISABLE. |
uint32_t QSPI_GetFIFOLevel | ( | void | ) |
Returns the current QSPI FIFO filled level.
None |
FlagStatus QSPI_GetFlagStatus | ( | uint32_t | QSPI_FLAG | ) |
Checks whether the specified QSPI flag is set or not.
QSPI_FLAG | specifies the QSPI flag to check. This parameter can be one of the following values:
|
uint32_t QSPI_GetFMode | ( | void | ) |
Returns the QSPI functional mode.
None |
ITStatus QSPI_GetITStatus | ( | uint32_t | QSPI_IT | ) |
Checks whether the specified QSPI interrupt has occurred or not.
QSPI_IT | specifies the QSPI interrupt source to check. This parameter can be one of the following values:
|
void QSPI_Init | ( | QSPI_InitTypeDef * | QSPI_InitStruct | ) |
Initializes the QSPI peripheral according to the specified parameters in the QSPI_InitStruct.
QSPI_InitStruct | pointer to a QSPI_InitTypeDef structure that contains the configuration information for the specified QSPI peripheral. |
void QSPI_ITConfig | ( | uint32_t | QSPI_IT, |
FunctionalState | NewState | ||
) |
Enables or disables the specified QSPI interrupts.
QSPI_IT | specifies the QSPI interrupt source to be enabled or disabled. This parameter can be any combination of the following values:
|
NewState | new state of the specified QSPI interrupt. This parameter can be: ENABLE or DISABLE. |
void QSPI_MemoryMappedMode_SetTimeout | ( | uint32_t | QSPI_Timeout | ) |
Sets the value of the Timeout in Memory Mapped mode.
QSPI_Timeout | This field indicates how many CLK cycles QSPI waits after the FIFO becomes full until it raises nCS, putting the flash memory in a lowerconsumption state. This parameter can be any value of between 0x0000 and 0xFFFF |
uint16_t QSPI_ReceiveData16 | ( | void | ) |
Returns the most recent received 16bit data by the QSPI peripheral.
None |
uint32_t QSPI_ReceiveData32 | ( | void | ) |
Returns the most recent received 32bit data by the QSPI peripheral.
None |
uint8_t QSPI_ReceiveData8 | ( | void | ) |
Returns the most recent received 8bit data by the QSPI peripheral.
None |
void QSPI_SendData16 | ( | uint16_t | Data | ) |
Transmits a 16bit Data through the QSPI peripheral.
Data | Data to be transmitted. |
void QSPI_SendData32 | ( | uint32_t | Data | ) |
Transmits a 32bit Data through the QSPI peripheral.
Data | Data to be transmitted. |
void QSPI_SendData8 | ( | uint8_t | Data | ) |
Transmits a 8bit Data through the QSPI peripheral.
Data | Data to be transmitted. |
void QSPI_SetAddress | ( | uint32_t | QSPI_Address | ) |
Sets the value of the Address.
QSPI_Address | Address to be send to the external flash memory. |
This parameter can be any value of between 0x00000000 and 0xFFFFFFFF
void QSPI_SetAlternateByte | ( | uint32_t | QSPI_AlternateByte | ) |
Sets the value of the Alternate Bytes.
QSPI_AlternateByte | Optional data to be send to the external QSPI device right after the address. This parameter can be any value of between 0x00000000 and 0xFFFFFFFF |
void QSPI_SetDataLength | ( | uint32_t | QSPI_DataLength | ) |
Sets number of Bytes to be transferred.
QSPI_DataLength | Number of data to be retrieved (value+1) in indirect and status-polling modes. A value no greater than 3 (indicating 4 bytes) should be used for status-polling mode. All 1s in indirect mode means undefined length, where QSPI will continue until the end of memory, as defined by FSIZE This parameter can be any value of between 0x00000000 and 0xFFFFFFFF 0x0000_0000: 1 byte is to be transferred 0x0000_0001: 2 bytes are to be transferred 0x0000_0002: 3 bytes are to be transferred 0x0000_0003: 4 bytes are to be transferred ... 0xFFFF_FFFD: 4,294,967,294 (4G-2) bytes are to be transferred 0xFFFF_FFFE: 4,294,967,295 (4G-1) bytes are to be transferred 0xFFFF_FFFF: undefined length – all bytes until the end of flash memory (as defined by FSIZE) are to be transferred |
void QSPI_SetFIFOThreshold | ( | uint32_t | QSPI_FIFOThreshold | ) |
Sets the FIFO Threshold.
QSPI_FIFOThres | Defines, in indirect mode, the threshold number of bytes in the FIFO which will cause the FIFO Threshold Flag FTF to be set. This parameter can be any value of between 0x00 and 0x0F |
void QSPI_StructInit | ( | QSPI_InitTypeDef * | QSPI_InitStruct | ) |
Fills each QSPI_InitStruct member with its default value.
QSPI_InitStruct | pointer to a QSPI_InitTypeDef structure which will be initialized. |
void QSPI_TimeoutCounterCmd | ( | FunctionalState | NewState | ) |
Enables or disables The Timeout Counter.
NewState | new state of the Timeout Counter. This parameter can be: ENABLE or DISABLE. |