![]() |
Imt.Base C++ API V4.1.1.0
|
Go to the source code of this file.
Enumerations | |
| enum | FLASH_Status { FLASH_BUSY = 1 , FLASH_ERROR_PG , FLASH_ERROR_WRP , FLASH_ERROR_READ , FLASH_COMPLETE , FLASH_TIMEOUT } |
| Flash peripheral module. More... | |
| enum | FLASH_Latency { FLASH_Latency_0 = ((uint32_t)0x00000000U) , FLASH_Latency_1 = ((uint32_t)0x00000001U) , FLASH_Latency_2 = ((uint32_t)0x00000002U) } |
| Flash latency cycles emumeration. More... | |
| enum | FLASH_HalfCycleAccess { FLASH_HalfCycleAccess_Enable = ((uint32_t)0x00000008U) , FLASH_HalfCycleAccess_Disable = ((uint32_t)0x00000000U) } |
| Flash half cycle access emumeration. More... | |
| enum | FLASH_PrefetchBuffer { FLASH_PrefetchBuffer_Enable = ((uint32_t)0x00000010U) , FLASH_PrefetchBuffer_Disable = ((uint32_t)0x00000000U) } |
| Flash prefetch buffer emumeration. More... | |
| enum | FLASH_Irq { FLASH_Irq_Error = ((uint32_t)0x00000400U) , FLASH_Irq_EndOfOperation = ((uint32_t)0x00001000U) } |
| Flash IRQ emumeration. More... | |
Functions | |
| void | FLASH_SetLatency (FLASH_Latency const latency) |
| Sets the code latency value. | |
| void | FLASH_HalfCycleAccessCmd (FLASH_HalfCycleAccess const halfCycleAccess) |
| Enables or disables the Half cycle flash access. | |
| void | FLASH_PrefetchBufferCmd (FLASH_PrefetchBuffer const prefetchBuffer) |
| Enables or disables the Prefetch Buffer. | |
| void | FLASH_EnableInterrupt (FLASH_Irq const irq, bool const doEnable) |
| Enables or disables the specified flash IRQ. | |
| void | FLASH_Unlock () |
| Unlocks the FLASH Program Erase Controller. | |
| void | FLASH_Lock () |
| Locks the FLASH Program Erase Controller. | |
| FLASH_Status | FLASH_ErasePage (uint32_t const pageAddress) |
| Erases a specified FLASH page. | |
| FLASH_Status | FLASH_ErasePageAsync (uint32_t const pageAddress) |
| Starts ereasing a specified FLASH page asynchronous. | |
| void | FLASH_ErasePageFinish () |
| Completes ereasing a page by cleraing the erease bit. | |
| FLASH_Status | FLASH_ProgramDoubleWord (uint32_t const address, uint32_t const data) |
| Programs a double word (32 bit) at a specified address and blocks until the word has been written. | |
| bool | FLASH_ProgramWordAsync (uint32_t const address, uint16_t const data) |
| Starts programming a word (16 bit) at a specified address and returns. | |
| void | FLASH_ProgramWordFinish () |
| Completes programming a word by cleraing the write bit. | |
| bool | FLASH_IsFlag (uint32_t const flag) |
| Checks if a FLASH flag is pending. | |
| void | FLASH_ClearFlag (uint32_t const flag) |
| Clears the FLASH's pending flags. | |
| FLASH_Status | FLASH_GetStatus () |
| Returns the FLASH Status. | |
| FLASH_Status | FLASH_WaitForLastOperation (uint32_t const timeout) |
| Waits for a Flash operation to complete or a TIMEOUT to occur. | |
| FLASH_Status | FLASH_ReadBlock (uint32_t const address, uint8_t *pBuffer, uint32_t const bufferSize) |
| Reads a block of memory from the flash. | |
Flash half cycle access emumeration.
| Enumerator | |
|---|---|
| FLASH_HalfCycleAccess_Enable | |
| FLASH_HalfCycleAccess_Disable | |
Definition at line 50 of file SystemPeripherals_Flash.h.
| enum FLASH_Irq |
Flash IRQ emumeration.
| Enumerator | |
|---|---|
| FLASH_Irq_Error | |
| FLASH_Irq_EndOfOperation | |
Definition at line 70 of file SystemPeripherals_Flash.h.
| enum FLASH_Latency |
Flash latency cycles emumeration.
| Enumerator | |
|---|---|
| FLASH_Latency_0 | |
| FLASH_Latency_1 | |
| FLASH_Latency_2 | |
Definition at line 38 of file SystemPeripherals_Flash.h.
| enum FLASH_PrefetchBuffer |
Flash prefetch buffer emumeration.
| Enumerator | |
|---|---|
| FLASH_PrefetchBuffer_Enable | |
| FLASH_PrefetchBuffer_Disable | |
Definition at line 60 of file SystemPeripherals_Flash.h.
| enum FLASH_Status |
Flash peripheral module.
Reference: ST_CortexM3_STM32F103_TRM_Rev15.pdf Reference: ST_CortexM3_STM32F103_HD_Datasheet_Rev12.pdf Reference: ST_CortexM3_STM32F103_Flash_programming_manual_Rev2.pdf Flash status emumeration.
| Enumerator | |
|---|---|
| FLASH_BUSY | |
| FLASH_ERROR_PG | |
| FLASH_ERROR_WRP | |
| FLASH_ERROR_READ | |
| FLASH_COMPLETE | |
| FLASH_TIMEOUT | |
Definition at line 26 of file SystemPeripherals_Flash.h.
| void FLASH_ClearFlag | ( | uint32_t const | flag | ) |
Clears the FLASH's pending flags.
| flag | specifies the FLASH flags to clear. This parameter can be any combination of the following values:
|
Enables or disables the specified flash IRQ.
| irq | Select the IRQ to enable/disable. |
| doEnable | true IRQ would be enabled false IRQ would be disabled |
| FLASH_Status FLASH_ErasePage | ( | uint32_t const | pageAddress | ) |
Erases a specified FLASH page.
| pageAddress | The page address to be erased. |
| FLASH_Status FLASH_ErasePageAsync | ( | uint32_t const | pageAddress | ) |
Starts ereasing a specified FLASH page asynchronous.
| pageAddress | The page address to be erased. |
| void FLASH_ErasePageFinish | ( | ) |
Completes ereasing a page by cleraing the erease bit.
| FLASH_Status FLASH_GetStatus | ( | ) |
Returns the FLASH Status.
| void FLASH_HalfCycleAccessCmd | ( | FLASH_HalfCycleAccess const | halfCycleAccess | ) |
Enables or disables the Half cycle flash access.
| halfCycleAccess | specifies the FLASH Half cycle Access mode. |
Checks if a FLASH flag is pending.
| flag | specifies the FLASH flags to check. This parameter can be any of the following values:
|
| void FLASH_Lock | ( | ) |
Locks the FLASH Program Erase Controller.
| void FLASH_PrefetchBufferCmd | ( | FLASH_PrefetchBuffer const | prefetchBuffer | ) |
Enables or disables the Prefetch Buffer.
| prefetchBuffer | specifies the Prefetch buffer status. |
| FLASH_Status FLASH_ProgramDoubleWord | ( | uint32_t const | address, |
| uint32_t const | data | ||
| ) |
Programs a double word (32 bit) at a specified address and blocks until the word has been written.
| address | specifies the address to be programmed. |
| data | specifies the data to be programmed. |
Starts programming a word (16 bit) at a specified address and returns.
Use FLASH_WaitForLastOperation or the EOP interrupt to wait on the eond of the programming.
| address | specifies the address to be programmed. |
| data | specifies the data to be programmed. |
| void FLASH_ProgramWordFinish | ( | ) |
Completes programming a word by cleraing the write bit.
| FLASH_Status FLASH_ReadBlock | ( | uint32_t const | address, |
| uint8_t * | pBuffer, | ||
| uint32_t const | bufferSize | ||
| ) |
Reads a block of memory from the flash.
| address | specifies the address to be read. |
| pBuffer | the buffer the block is read into. |
| bufferSize | the number of bytes to read. |
| void FLASH_SetLatency | ( | FLASH_Latency const | latency | ) |
Sets the code latency value.
| latency | specifies the FLASH Latency value. |
| void FLASH_Unlock | ( | ) |
Unlocks the FLASH Program Erase Controller.
| FLASH_Status FLASH_WaitForLastOperation | ( | uint32_t const | timeout | ) |
Waits for a Flash operation to complete or a TIMEOUT to occur.
| timeout | FLASH programming Timeout |