WB32L003 Standard Peripherals Firmware Library

模块 | 枚举 | 函数
FLASH
WB32L003_StdPeriph_Driver

FLASH driver modules 更多...

## 模块
| FLASH_Exported_Constants
| FLASH_Private_Constants
| FLASH_Private_Functions

## 枚举
enum | FLASH_Status { FLASH_BUSY = 1, FLASH_ERROR_ERPC, FLASH_ERROR_ERPROT, FLASH_COMPLETE, FLASH_TIMEOUT }
| FLASH Status 更多...

## 函数
void | FLASH_OP_Unlock (uint32_t PageAddr)
| Lock the FLASH Page Erase/Write access. 更多...
void | FLASH_OP_Lock (uint32_t PageAddr)
| Unlock the FLASH Page Erase/Write access. 更多...
void | FLASH_Unlock (void)
| Unlock the FLASH controller register write-protect. 更多...
void | FLASH_Lock (void)
| Lock the FLASH controller register write-protect. 更多...
void | FLASH_ITConfig (uint32_t FLASH_IT, FunctionalState NewState)
| Enables or disables the specified FLASH interrupts. 更多...
void | FLASH_ClearITPendingBit (uint32_t FLASH_IT)
| Clear the specified FLASH interrupt flag. 更多...
FlagStatus | FLASH_GetITStatus (uint32_t Flag)
| Checks whether the specified FLASH interrupt has occurred or not. 更多...
FlagStatus | FLASH_GetFlagStatus (uint32_t Flag)
| Checks whether the specified FLASH flag is set or not. 更多...
FLASH_Status | FLASH_WaitForLastOperation (uint32_t Timeout)
| Wait for a FLASH operation to complete. 更多...
FLASH_Status | FLASH_ProgramByte (uint32_t Addr, uint8_t Data)
| Program a byte (8-bit) at a specified address. 更多...
FLASH_Status | FLASH_ProgramHalfWord (uint32_t Addr, uint16_t Data)
| Program a half-word (16-bit) at a specified address. 更多...
FLASH_Status | FLASH_ProgramWord (uint32_t Addr, uint32_t Data)
| Program a word (32-bit) at a specified address. 更多...
FLASH_Status | FLASH_EraseChip (void)
| Full erase of FLASH memory Bank 更多...
FLASH_Status | FLASH_ErasePage (uint32_t PageAddr)
| Erase the specified FLASH memory page 更多...

## 详细描述

FLASH driver modules

## 枚举类型说明

## ◆ FLASH_Status

enum FLASH_Status

FLASH Status

## 函数说明

## ◆ FLASH_ClearITPendingBit()

void FLASH_ClearITPendingBit | ( | uint32_t | FLASH_IT | ) |

Clear the specified FLASH interrupt flag.

参数

  FLASH_IT | specifies the FLASH interrupt flags to clear. This parameter can be any combination of the following values: FLASH_FLAG_ALARM_ERASE_PROTADDR: The address to be erased is protectd interrupt flag FLASH_FLAG_ALARM_ERASE_PCADDR: The address to be erased is PC interrupt source

返回值

  none |

## ◆ FLASH_EraseChip()

FLASH_Status FLASH_EraseChip | ( | void |  | ) |

Full erase of FLASH memory Bank

参数

  None |

返回值

  None |

## ◆ FLASH_ErasePage()

FLASH_Status FLASH_ErasePage | ( | uint32_t | PageAddr | ) |

Erase the specified FLASH memory page

参数

  PageAddr | FLASH page to erase The value of this parameter depend on device used within the same series

返回值

  None |

## ◆ FLASH_GetFlagStatus()

FlagStatus FLASH_GetFlagStatus | ( | uint32_t | Flag | ) |

Checks whether the specified FLASH flag is set or not.

参数

  Flag | specifies the FLASH flag to check. This parameter can be: FLASH_FLAG_BUSY: FLASH busy flag.

返回值

  The | new state of the FLASH flag (SET or RESET).

## ◆ FLASH_GetITStatus()

FlagStatus FLASH_GetITStatus | ( | uint32_t | FLASH_IT | ) |

Checks whether the specified FLASH interrupt has occurred or not.

参数

  FLASH_IT | specifies the FLASH interrupt source to check. This parameter can be: FLASH_IT_ALARM_ERASE_PROTADDR: Flash erase protection alarm interrupt flag. FLASH_IT_ALARM_ERASE_PCADDR: Flash erase PC address alarm interrupt flag.

返回值

  The | new state of the FLASH flag (SET or RESET).

## ◆ FLASH_ITConfig()

void FLASH_ITConfig | ( | uint32_t | FLASH_IT,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified FLASH interrupts.

参数

  FLASH_IT | FLASH interrupts. This parameter can be any combination of the following values: FLASH_IT_ALARM_ERASE_PROTADDR: The address to be erased is protectd interrupt source. FLASH_IT_ALARM_ERASE_PCADDR: The address to be erased is PC interrupt source.

返回值

  none |

## ◆ FLASH_Lock()

void FLASH_Lock | ( | void |  | ) |

Lock the FLASH controller register write-protect.

参数

  None |

返回值

  None |

## ◆ FLASH_OP_Lock()

void FLASH_OP_Lock | ( | uint32_t | PageAddr | ) |

Unlock the FLASH Page Erase/Write access.

参数

  PageAddr | Set the page address to lock erase/write protect. This parameter can be set 0xFFFFFFFF which means lock all pages.

返回值

  None |

## ◆ FLASH_OP_Unlock()

void FLASH_OP_Unlock | ( | uint32_t | PageAddr | ) |

Lock the FLASH Page Erase/Write access.

参数

  PageAddr | Set the page address to lock erase/write protect. This parameter can be set 0xFFFFFFFF which means lock all pages.

返回值

  None |

## ◆ FLASH_ProgramByte()

FLASH_Status FLASH_ProgramByte | ( | uint32_t | Addr,
|  | uint8_t | Data
| ) |  |

Program a byte (8-bit) at a specified address.

参数

  Addr | specify the address to be programmed.
  Data | specify the data to be programmed.

返回值

  None |

## ◆ FLASH_ProgramHalfWord()

FLASH_Status FLASH_ProgramHalfWord | ( | uint32_t | Addr,
|  | uint16_t | Data
| ) |  |

Program a half-word (16-bit) at a specified address.

参数

  Addr | specify the address to be programmed.
  Data | specify the data to be programmed.

返回值

  None |

## ◆ FLASH_ProgramWord()

FLASH_Status FLASH_ProgramWord | ( | uint32_t | Addr,
|  | uint32_t | Data
| ) |  |

Program a word (32-bit) at a specified address.

参数

  Addr | specify the address to be programmed.
  Data | specify the data to be programmed.

返回值

  None |

## ◆ FLASH_Unlock()

void FLASH_Unlock | ( | void |  | ) |

Unlock the FLASH controller register write-protect.

参数

  None |

返回值

  None |

## ◆ FLASH_WaitForLastOperation()

FLASH_Status FLASH_WaitForLastOperation | ( | uint32_t | Timeout | ) |

Wait for a FLASH operation to complete.

参数

  Timeout | maximum flash operation timeout

返回值

  FLASH_Status |