MG32L003 Standard Peripherals Firmware Library

宏定义 | 枚举 | 函数
mg32l003_flash.h 文件参考

This file contains all the functions prototypes for the FLASH firmware library. 更多...

`#include "mg32l003.h"`

浏览源代码.

## 宏定义
#define | FLASH_TIMEOUT_VALUE 50000U
#define | FLASH_REGUNLOCK_KEY1 0x5A5AU
#define | FLASH_REGUNLOCK_KEY2 0xA5A5U
#define | FLASH_FLAG_BUSY FLASH_CR_BUSY
#define | FLASH_IT_ALARM_ERASE_PROTADDR (FLASH_IFR_IF1 | FLASH_CR_IE_1)
#define | FLASH_IT_ALARM_ERASE_PCADDR (FLASH_IFR_IF0 | FLASH_CR_IE_0)
#define | FLASH_PAGE_SIZE 0x200U
#define | FLASH_SIZE_32K 0x8000U
#define | FLASH_SIZE_64K 0x10000U
#define | FLASH_ALLPAGE_SELECTED 0xFFFFFFFFU

## 枚举
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 更多...

## 详细描述

This file contains all the functions prototypes for the FLASH firmware library.

作者
  megawin Application Team

版本
  V0.0.5

日期
  13-August-2024