STM32F37 Standard Peripheral bibliotheek
1.0
ST Microelectronics bibliotheek documentatie voor de STM32F37 Standard Peripheral Library
|
FLASH driver modules. More...
Modules | |
FLASH_Exported_Constants | |
FLASH_Legacy | |
FLASH_Private_Functions | |
Enumerations | |
enum | FLASH_Status { FLASH_BUSY = 1, FLASH_ERROR_WRP, FLASH_ERROR_PROGRAM, FLASH_COMPLETE, FLASH_TIMEOUT } |
FLASH Status. | |
Functions | |
void | FLASH_SetLatency (uint32_t FLASH_Latency) |
Sets the code latency value. More... | |
void | FLASH_HalfCycleAccessCmd (FunctionalState NewState) |
Enables or disables the Half cycle flash access. More... | |
void | FLASH_PrefetchBufferCmd (FunctionalState NewState) |
Enables or disables the Prefetch Buffer. More... | |
void | FLASH_Unlock (void) |
Unlocks the FLASH control register and program memory access. More... | |
void | FLASH_Lock (void) |
Locks the FLASH control register access. More... | |
FLASH_Status | FLASH_ErasePage (uint32_t Page_Address) |
Erases a specified page in program memory. More... | |
FLASH_Status | FLASH_EraseAllPages (void) |
Erases all FLASH pages. More... | |
FLASH_Status | FLASH_ProgramWord (uint32_t Address, uint32_t Data) |
Programs a word at a specified address. More... | |
FLASH_Status | FLASH_ProgramHalfWord (uint32_t Address, uint16_t Data) |
Programs a half word at a specified address. More... | |
void | FLASH_OB_Unlock (void) |
Unlocks the option bytes block access. More... | |
void | FLASH_OB_Lock (void) |
Locks the option bytes block access. More... | |
void | FLASH_OB_Launch (void) |
Launch the option byte loading. More... | |
FLASH_Status | FLASH_OB_Erase (void) |
Erases the FLASH option bytes. More... | |
FLASH_Status | FLASH_OB_ProgramData (uint32_t Address, uint8_t Data) |
Programs a half word at a specified Option Byte Data address. More... | |
FLASH_Status | FLASH_OB_EnableWRP (uint32_t OB_WRP) |
Write protects the desired pages. More... | |
FLASH_Status | FLASH_OB_RDPConfig (uint8_t OB_RDP) |
Enables or disables the read out protection. More... | |
FLASH_Status | FLASH_OB_UserConfig (uint8_t OB_IWDG, uint8_t OB_STOP, uint8_t OB_STDBY) |
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY. More... | |
FLASH_Status | FLASH_OB_BOOTConfig (uint8_t OB_BOOT1) |
Sets or resets the BOOT1 option bit. More... | |
FLASH_Status | FLASH_OB_VDDAConfig (uint8_t OB_VDDA_ANALOG) |
Sets or resets the analogue monitoring on VDDA Power source. More... | |
FLASH_Status | FLASH_OB_VDD_SD12Config (uint8_t OB_VDD_SD12) |
Sets or resets the analogue monitoring on VDD_SD12 Power source. More... | |
FLASH_Status | FLASH_OB_SRAMParityConfig (uint8_t OB_SRAM_Parity) |
Sets or resets the SRAM partiy. More... | |
FLASH_Status | FLASH_OB_WriteUser (uint8_t OB_USER) |
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY/ BOOT1 / OB_VDDA_ANALOG and OB_VDD_SD12. More... | |
uint8_t | FLASH_OB_GetUser (void) |
Returns the FLASH User Option Bytes values. More... | |
uint32_t | FLASH_OB_GetWRP (void) |
Returns the FLASH Write Protection Option Bytes value. More... | |
FlagStatus | FLASH_OB_GetRDP (void) |
Checks whether the FLASH Read out Protection Status is set or not. More... | |
void | FLASH_ITConfig (uint32_t FLASH_IT, FunctionalState NewState) |
Enables or disables the specified FLASH interrupts. More... | |
FlagStatus | FLASH_GetFlagStatus (uint32_t FLASH_FLAG) |
Checks whether the specified FLASH flag is set or not. More... | |
void | FLASH_ClearFlag (uint32_t FLASH_FLAG) |
Clears the FLASH's pending flags. More... | |
FLASH_Status | FLASH_GetStatus (void) |
Returns the FLASH Status. More... | |
FLASH_Status | FLASH_WaitForLastOperation (uint32_t Timeout) |
Waits for a FLASH operation to complete or a TIMEOUT to occur. More... | |
FLASH driver modules.
void FLASH_ClearFlag | ( | uint32_t | FLASH_FLAG | ) |
Clears the FLASH's pending flags.
FLASH_FLAG,: | specifies the FLASH flags to clear. This parameter can be any combination of the following values:
|
None |
FLASH_Status FLASH_EraseAllPages | ( | void | ) |
Erases all FLASH pages.
None |
FLASH | Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FLASH_Status FLASH_ErasePage | ( | uint32_t | Page_Address | ) |
Erases a specified page in program memory.
Page_Address,: | The page address in program memory to be erased. |
FLASH | Status: The returned value can be: FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FlagStatus FLASH_GetFlagStatus | ( | uint32_t | FLASH_FLAG | ) |
Checks whether the specified FLASH flag is set or not.
FLASH_FLAG,: | specifies the FLASH flag to check. This parameter can be one of the following values:
|
The | new state of FLASH_FLAG (SET or RESET). |
FLASH_Status FLASH_GetStatus | ( | void | ) |
Returns the FLASH Status.
None |
FLASH | Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP or FLASH_COMPLETE. |
void FLASH_HalfCycleAccessCmd | ( | FunctionalState | NewState | ) |
Enables or disables the Half cycle flash access.
FLASH_HalfCycleAccess,: | specifies the FLASH Half cycle Access mode. This parameter can be one of the following values:
|
None |
void FLASH_ITConfig | ( | uint32_t | FLASH_IT, |
FunctionalState | NewState | ||
) |
Enables or disables the specified FLASH interrupts.
FLASH_IT,: | specifies the FLASH interrupt sources to be enabled or disabled. This parameter can be any combination of the following values:
|
None |
void FLASH_Lock | ( | void | ) |
Locks the FLASH control register access.
None |
None |
FLASH_Status FLASH_OB_BOOTConfig | ( | uint8_t | OB_BOOT1 | ) |
Sets or resets the BOOT1 option bit.
OB_BOOT1,: | Set or Reset the BOOT1 option bit. This parameter can be one of the following values:
|
None |
FLASH_Status FLASH_OB_EnableWRP | ( | uint32_t | OB_WRP | ) |
Write protects the desired pages.
OB_WRP,: | specifies the address of the pages to be write protected. This parameter can be:
|
FLASH | Status: The returned value can be: FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FLASH_Status FLASH_OB_Erase | ( | void | ) |
Erases the FLASH option bytes.
None |
FLASH | Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FlagStatus FLASH_OB_GetRDP | ( | void | ) |
Checks whether the FLASH Read out Protection Status is set or not.
None |
FLASH | ReadOut Protection Status(SET or RESET) |
uint8_t FLASH_OB_GetUser | ( | void | ) |
Returns the FLASH User Option Bytes values.
None |
The | FLASH User Option Bytes . |
uint32_t FLASH_OB_GetWRP | ( | void | ) |
Returns the FLASH Write Protection Option Bytes value.
None |
The | FLASH Write Protection Option Bytes value |
void FLASH_OB_Launch | ( | void | ) |
Launch the option byte loading.
None |
None |
void FLASH_OB_Lock | ( | void | ) |
Locks the option bytes block access.
None |
None |
FLASH_Status FLASH_OB_ProgramData | ( | uint32_t | Address, |
uint8_t | Data | ||
) |
Programs a half word at a specified Option Byte Data address.
Address,: | specifies the address to be programmed. This parameter can be 0x1FFFF804 or 0x1FFFF806. |
Data,: | specifies the data to be programmed. |
FLASH | Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FLASH_Status FLASH_OB_RDPConfig | ( | uint8_t | OB_RDP | ) |
Enables or disables the read out protection.
FLASH_ReadProtection_Level,: | specifies the read protection level. This parameter can be:
|
FLASH | Status: The returned value can be: FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FLASH_Status FLASH_OB_SRAMParityConfig | ( | uint8_t | OB_SRAM_Parity | ) |
Sets or resets the SRAM partiy.
OB_SRAM_Parity,: | SSet or Reset the SRAM partiy enable bit. This parameter can be one of the following values:
|
None |
void FLASH_OB_Unlock | ( | void | ) |
Unlocks the option bytes block access.
None |
None |
FLASH_Status FLASH_OB_UserConfig | ( | uint8_t | OB_IWDG, |
uint8_t | OB_STOP, | ||
uint8_t | OB_STDBY | ||
) |
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY.
OB_IWDG,: | Selects the WDG mode This parameter can be one of the following values:
|
OB_STOP,: | Reset event when entering STOP mode. This parameter can be one of the following values:
|
OB_STDBY,: | Reset event when entering Standby mode. This parameter can be one of the following values:
|
FLASH | Status: The returned value can be: FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FLASH_Status FLASH_OB_VDD_SD12Config | ( | uint8_t | OB_VDD_SD12 | ) |
Sets or resets the analogue monitoring on VDD_SD12 Power source.
OB_VDD_SD12,: | Selects the analog monitoring on VDD_SD12 Power source. This parameter can be one of the following values:
|
None |
FLASH_Status FLASH_OB_VDDAConfig | ( | uint8_t | OB_VDDA_ANALOG | ) |
Sets or resets the analogue monitoring on VDDA Power source.
OB_VDDA_ANALOG,: | Selects the analog monitoring on VDDA Power source. This parameter can be one of the following values:
|
None |
FLASH_Status FLASH_OB_WriteUser | ( | uint8_t | OB_USER | ) |
Programs the FLASH User Option Byte: IWDG_SW / RST_STOP / RST_STDBY/ BOOT1 / OB_VDDA_ANALOG and OB_VDD_SD12.
OB_USER,: | Selects all user option bytes This parameter is a combination of the following values:
|
FLASH | Status: The returned value can be: FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
void FLASH_PrefetchBufferCmd | ( | FunctionalState | NewState | ) |
Enables or disables the Prefetch Buffer.
NewState,: | new state of the Prefetch Buffer. This parameter can be: ENABLE or DISABLE. |
None |
FLASH_Status FLASH_ProgramHalfWord | ( | uint32_t | Address, |
uint16_t | Data | ||
) |
Programs a half word at a specified address.
Address,: | specifies the address to be programmed. |
Data,: | specifies the data to be programmed. |
FLASH | Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
FLASH_Status FLASH_ProgramWord | ( | uint32_t | Address, |
uint32_t | Data | ||
) |
Programs a word at a specified address.
Address,: | specifies the address to be programmed. |
Data,: | specifies the data to be programmed. |
FLASH | Status: The returned value can be: FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |
void FLASH_SetLatency | ( | uint32_t | FLASH_Latency | ) |
Sets the code latency value.
FLASH_Latency,: | specifies the FLASH Latency value. This parameter can be one of the following values:
|
None |
void FLASH_Unlock | ( | void | ) |
Unlocks the FLASH control register and program memory access.
None |
None |
FLASH_Status FLASH_WaitForLastOperation | ( | uint32_t | Timeout | ) |
Waits for a FLASH operation to complete or a TIMEOUT to occur.
Timeout,: | FLASH programming Timeout |
FLASH | Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. |