Sets the code latency value.
This driver provides functions to configure and program the Flash memory of all STM32F10x devices,
including the latest STM32F10x_XL density devices.
STM32F10x_XL devices feature up to 1 Mbyte with dual bank architecture
for read-
while-
write (RWW) capability:
- bank1: fixed size of 512 Kbytes (256 pages of 2Kbytes each)
- bank2: up to 512 Kbytes (up to 256 pages of 2Kbytes each)
While other STM32F10x devices features only
one bank with memory up to 512 Kbytes.
In version V3.3.0, some functions were updated and new ones were added to support
STM32F10x_XL devices. Thus some functions manages all devices, while other are
dedicated for XL devices only.
The table below presents the list of available functions depending on the used STM32F10x devices.
Legacy functions used for all STM32F10x devices *
+----------------------------------------------------------------------------------------------------------------------------------+
| Functions prototypes |STM32F10x_XL|Other STM32F10x| Comments |
| | devices | devices | |
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_Unlock | Yes | Yes | - For STM32F10X_XL devices: unlock Bank1 and Bank2. |
| | | | - For other devices: unlock Bank1 and it is equivalent |
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_Lock | Yes | Yes | - For STM32F10X_XL devices: lock Bank1 and Bank2. |
| | | | - For other devices: lock Bank1 and it is equivalent |
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_ErasePage | Yes | Yes | - For STM32F10x_XL devices: erase a page in Bank1 and Bank2 |
| | | | - For other devices: erase a page in Bank1 |
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_EraseAllPages | Yes | Yes | - For STM32F10x_XL devices: erase all pages in Bank1 and Bank2 |
| | | | - For other devices: erase all pages in Bank1 |
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_ProgramWord | Yes | Yes | Updated to program up to 1MByte (depending on the used device) |
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_ITConfig | Yes | Yes | - For STM32F10x_XL devices: enable Bank1 and Bank2's interrupts|
| | | | - For other devices: enable Bank1's interrupts |
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_GetFlagStatus | Yes | Yes | - For STM32F10x_XL devices: return Bank1 and Bank2's flag status|
| | | | - For other devices: return Bank1's flag status |
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_ClearFlag | Yes | Yes | - For STM32F10x_XL devices: clear Bank1 and Bank2's flag |
| | | | - For other devices: clear Bank1's flag |
|----------------------------------------------------------------------------------------------------------------------------------|
|
FLASH_GetStatus | Yes | Yes | - Return the status of Bank1 (for all devices) |
|----------------------------------------------------------------------------------------------------------------------------------|
+----------------------------------------------------------------------------------------------------------------------------------+
New functions used for all STM32F10x devices to manage Bank1: *
- These functions are mainly useful for STM32F10x_XL density devices, to have separate control for Bank1 and bank2 *
- For other devices, these functions are optional (covered by functions listed above) *
+----------------------------------------------------------------------------------------------------------------------------------+
| Functions prototypes |STM32F10x_XL|Other STM32F10x| Comments |
| | devices | devices | |
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------------------|
+----------------------------------------------------------------------------------------------------------------------------------+
New Functions used only with STM32F10x_XL density devices to manage Bank2 *
+----------------------------------------------------------------------------------------------------------------------------------+
| Functions prototypes |STM32F10x_XL|Other STM32F10x| Comments |
| | devices | devices | |
|----------------------------------------------------------------------------------------------------------------------------------|
| FLASH_UnlockBank2 | Yes | No | - Unlock Bank2 |
|----------------------------------------------------------------------------------------------------------------------------------|
|FLASH_LockBank2 | Yes | No | - Lock Bank2 |
|----------------------------------------------------------------------------------------------------------------------------------|
| FLASH_EraseAllBank2Pages | Yes | No | - Erase all pages in Bank2 |
|----------------------------------------------------------------------------------------------------------------------------------|
| FLASH_GetBank2Status | Yes | No | - Return the status of Bank2 |
|----------------------------------------------------------------------------------------------------------------------------------|
| FLASH_WaitForLastBank2Operation | Yes | No | - Wait for Bank2 last operation |
|----------------------------------------------------------------------------------------------------------------------------------|
| FLASH_BootConfig | Yes | No | - Configure to boot from Bank1 or Bank2 |
+----------------------------------------------------------------------------------------------------------------------------------+