| BlueNRG-1 Peripherals drivers APIs

- Main Page
- Modules
- Classes
- Files

Functions
Exported Functions
BLUENRG1 Peripheral Driver » FLASH Peripheral

## Functions

void | FLASH_ErasePage (uint16_t PageNumber)
| Erases a specified flash page. More...
void | FLASH_EraseAllFlash (void)
| Erases all main Flash. More...
uint32_t | FLASH_ReadWord (uint32_t Address)
| Flash read 32 bits. More...
void | FLASH_ProgramWord (uint32_t Address, uint32_t Data)
| Flash write 32 bits. More...
void | FLASH_ProgramWordBurst (uint32_t Address, uint32_t *Data)
| Flash write 32 bits. More...
void | FLASH_WaitCmdDone (void)
| Wait loop for CMDDONE status. More...
uint16_t | FLASH_NextFreeFlashAddress (void)
| Wait loop for CMDDONE status. More...
void | FLASH_ITConfig (uint8_t FlashFlag, FunctionalState NewState)
| Enables or disables the specified flash interrupts. More...
void | FLASH_ClearITPendingBit (uint8_t FlashFlag)
| Clears the specific flash pending IT bit. More...
FlagStatus | FLASH_GetFlagStatus (uint8_t FlashFlag)
| Checks whether the specified FLASH raw flag is set or not. More...
void | FLASH_ClearFlag (uint8_t FlashFlag)
| Clears the specific flash pending flags. More...

## Detailed Description

## Function Documentation

void FLASH_ClearFlag | ( | uint8_t | FlashFlag | ) |

Clears the specific flash pending flags.

Parameters

  FlashFlag | the FLASH flag to clear, this can be
  - Flash_CMDDONE Flash command done
  - Flash_CMDSTART Flash command start
  - Flash_CMDERR Flash command error
  - Flash_ILLCMD Flash illegal command written
  - Flash_READOK Flash mass read was OK
  - Flash_FLNREADY Flash not ready (sleep)

Return values

  None |

Definition at line 317 of file BlueNRG1_flash.c.

void FLASH_ClearITPendingBit | ( | uint8_t | FlashFlag | ) |

Clears the specific flash pending IT bit.

Parameters

  FlashFlag | the FLASH flag to clear, this can be
  - Flash_CMDDONE Flash command done
  - Flash_CMDSTART Flash command start
  - Flash_CMDERR Flash command error
  - Flash_ILLCMD Flash illegal command written
  - Flash_READOK Flash mass read was OK
  - Flash_FLNREADY Flash not ready (sleep)

Return values

  None |

Definition at line 272 of file BlueNRG1_flash.c.

void FLASH_EraseAllFlash | ( | void |  | ) |

Erases all main Flash.

Parameters

  None |

Return values

  None |

Definition at line 113 of file BlueNRG1_flash.c.

void FLASH_ErasePage | ( | uint16_t | PageNumber | ) |

Erases a specified flash page.

Parameters

  PageNumber | the page number.

Return values

  None |

Definition at line 85 of file BlueNRG1_flash.c.

FlagStatus FLASH_GetFlagStatus | ( | uint8_t | FlashFlag | ) |

Checks whether the specified FLASH raw flag is set or not.

Parameters

  FlashFlag | the FLASH flag to check, this can be
  - Flash_CMDDONE Flash command done
  - Flash_CMDSTART Flash command start
  - Flash_CMDERR Flash command error
  - Flash_ILLCMD Flash illegal command written
  - Flash_READOK Flash mass read was OK
  - Flash_FLNREADY Flash not ready (sleep)

Return values

  FlagStatus | functional state FlagStatus This parameter can be: SET or RESET.

Definition at line 293 of file BlueNRG1_flash.c.

void FLASH_ITConfig | ( | uint8_t | FlashFlag,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified flash interrupts.

Parameters

  FlashFlag | the value can be
  - Flash_CMDDONE Flash command done
  - Flash_CMDSTART Flash command start
  - Flash_CMDERR Flash command error
  - Flash_ILLCMD Flash illegal command written
  - Flash_READOK Flash mass read was OK
  - Flash_FLNREADY Flash not ready (sleep)
  NewState | functional state FunctionalState This parameter can be: ENABLE or DISABLE.

Return values

  None |

Definition at line 246 of file BlueNRG1_flash.c.

uint16_t FLASH_NextFreeFlashAddress | ( | void |  | ) |

Wait loop for CMDDONE status.

Parameters

  None |

Return values

  uint32_t | Next usable address of flash

Definition at line 227 of file BlueNRG1_flash.c.

void FLASH_ProgramWord | ( | uint32_t | Address,
|  | uint32_t | Data
| ) |  |

Flash write 32 bits.

Parameters

  Address | address to write
  Data | word to write

Return values

  None |

Definition at line 143 of file BlueNRG1_flash.c.

void FLASH_ProgramWordBurst | ( | uint32_t | Address,
|  | uint32_t * | Data
| ) |  |

Flash write 32 bits.

Parameters

  WordNumber | word number
  PageNumber | page number <= 2048
  Data | word to write <= 512

Return values

  None |

Definition at line 172 of file BlueNRG1_flash.c.

uint32_t FLASH_ReadWord | ( | uint32_t | Address | ) |

Flash read 32 bits.

Parameters

  Address | address to write

Return values

  Data | read

Definition at line 130 of file BlueNRG1_flash.c.

void FLASH_WaitCmdDone | ( | void |  | ) |

Wait loop for CMDDONE status.

Parameters

  None |

Return values

  None |

Definition at line 203 of file BlueNRG1_flash.c.