Defined Constants and Types for the STM32L1xx FLASH Memory.
More...
Defined Constants and Types for the STM32L1xx FLASH Memory.
- Version
- 1.0.0
- Author
- © 2012 Karl Palsson karlp.nosp@m.@twe.nosp@m.ak.ne.nosp@m.t.au
- Date
- 14 January 2014
LGPL License Terms libopencm3 License
◆ FLASH_ACR
◆ FLASH_ACR_ACC64
#define FLASH_ACR_ACC64 (1 << 2) |
◆ FLASH_ACR_LATENCY_MASK
#define FLASH_ACR_LATENCY_MASK 1 |
◆ FLASH_ACR_LATENCY_SHIFT
#define FLASH_ACR_LATENCY_SHIFT 0 |
◆ FLASH_ACR_PRFTEN
#define FLASH_ACR_PRFTEN (1 << 1) |
◆ FLASH_ACR_RUNPD
#define FLASH_ACR_RUNPD (1 << 4) |
◆ FLASH_ACR_SLEEPPD
#define FLASH_ACR_SLEEPPD (1 << 3) |
◆ FLASH_HALF_PAGE_SIZE
#define FLASH_HALF_PAGE_SIZE 32 |
◆ FLASH_OBR
◆ FLASH_OBR_BFB2
#define FLASH_OBR_BFB2 (1 << 23) |
◆ FLASH_OBR_BOR_LEVEL_1
#define FLASH_OBR_BOR_LEVEL_1 (0x8 << 16) |
◆ FLASH_OBR_BOR_LEVEL_2
#define FLASH_OBR_BOR_LEVEL_2 (0x9 << 16) |
◆ FLASH_OBR_BOR_LEVEL_3
#define FLASH_OBR_BOR_LEVEL_3 (0xa << 16) |
◆ FLASH_OBR_BOR_LEVEL_4
#define FLASH_OBR_BOR_LEVEL_4 (0xb << 16) |
◆ FLASH_OBR_BOR_LEVEL_5
#define FLASH_OBR_BOR_LEVEL_5 (0xc << 16) |
◆ FLASH_OBR_BOR_OFF
#define FLASH_OBR_BOR_OFF (0x0 << 16) |
◆ FLASH_OBR_IWDG_SW
#define FLASH_OBR_IWDG_SW (1 << 20) |
◆ FLASH_OBR_NRST_STDBY
#define FLASH_OBR_NRST_STDBY (1 << 22) |
◆ FLASH_OBR_NRST_STOP
#define FLASH_OBR_NRST_STOP (1 << 21) |
◆ FLASH_OBR_RDPRT_LEVEL_0
#define FLASH_OBR_RDPRT_LEVEL_0 (0xaa) |
◆ FLASH_OBR_RDPRT_LEVEL_1
#define FLASH_OBR_RDPRT_LEVEL_1 (0x00) |
◆ FLASH_OBR_RDPRT_LEVEL_2
#define FLASH_OBR_RDPRT_LEVEL_2 (0xcc) |
◆ FLASH_OPTKEYR
◆ FLASH_OPTKEYR_KEY1
#define FLASH_OPTKEYR_KEY1 ((uint32_t)0xFBEAD9C8) |
◆ FLASH_OPTKEYR_KEY2
#define FLASH_OPTKEYR_KEY2 ((uint32_t)0x24252627) |
◆ FLASH_PDKEYR
◆ FLASH_PDKEYR_PDKEY1
#define FLASH_PDKEYR_PDKEY1 ((uint32_t)0x04152637) |
◆ FLASH_PDKEYR_PDKEY2
#define FLASH_PDKEYR_PDKEY2 ((uint32_t)0xFAFBFCFD) |
◆ FLASH_PECR
◆ FLASH_PECR_DATA
#define FLASH_PECR_DATA (1 << 4) |
◆ FLASH_PECR_EOPIE
#define FLASH_PECR_EOPIE (1 << 16) |
◆ FLASH_PECR_ERASE
#define FLASH_PECR_ERASE (1 << 9) |
◆ FLASH_PECR_ERRIE
#define FLASH_PECR_ERRIE (1 << 17) |
◆ FLASH_PECR_FPRG
#define FLASH_PECR_FPRG (1 << 10) |
◆ FLASH_PECR_FTDW
#define FLASH_PECR_FTDW (1 << 8) |
◆ FLASH_PECR_OBL_LAUNCH
#define FLASH_PECR_OBL_LAUNCH (1 << 18) |
◆ FLASH_PECR_OPTLOCK
#define FLASH_PECR_OPTLOCK (1 << 2) |
◆ FLASH_PECR_PARALLBANK
#define FLASH_PECR_PARALLBANK (1 << 15) |
◆ FLASH_PECR_PELOCK
#define FLASH_PECR_PELOCK (1 << 0) |
◆ FLASH_PECR_PRGLOCK
#define FLASH_PECR_PRGLOCK (1 << 1) |
◆ FLASH_PECR_PROG
#define FLASH_PECR_PROG (1 << 3) |
◆ FLASH_PEKEYR
◆ FLASH_PEKEYR_PEKEY1
#define FLASH_PEKEYR_PEKEY1 ((uint32_t)0x89ABCDEF) |
◆ FLASH_PEKEYR_PEKEY2
#define FLASH_PEKEYR_PEKEY2 ((uint32_t)0x02030405) |
◆ FLASH_PRGKEYR
◆ FLASH_PRGKEYR_PRGKEY1
#define FLASH_PRGKEYR_PRGKEY1 ((uint32_t)0x8C9DAEBF) |
◆ FLASH_PRGKEYR_PRGKEY2
#define FLASH_PRGKEYR_PRGKEY2 ((uint32_t)0x13141516) |
◆ FLASH_SR
◆ FLASH_SR_BSY
#define FLASH_SR_BSY (1 << 0) |
◆ FLASH_SR_ENDHV
#define FLASH_SR_ENDHV (1 << 2) |
◆ FLASH_SR_EOP
#define FLASH_SR_EOP (1 << 1) |
◆ FLASH_SR_OPTVERR
#define FLASH_SR_OPTVERR (1 << 11) |
◆ FLASH_SR_OPTVERRUSR
#define FLASH_SR_OPTVERRUSR (1 << 12) |
◆ FLASH_SR_PGAERR
#define FLASH_SR_PGAERR (1 << 9) |
◆ FLASH_SR_READY
#define FLASH_SR_READY (1 << 3) |
◆ FLASH_SR_SIZEERR
#define FLASH_SR_SIZEERR (1 << 10) |
◆ FLASH_SR_WRPERR
#define FLASH_SR_WRPERR (1 << 8) |
◆ FLASH_WRPR1
◆ FLASH_WRPR2
◆ FLASH_WRPR3
◆ eeprom_program_word()
void eeprom_program_word |
( |
uint32_t |
address, |
|
|
uint32_t |
data |
|
) |
| |
◆ eeprom_program_words()
void eeprom_program_words |
( |
uint32_t |
address, |
|
|
uint32_t * |
data, |
|
|
int |
length_in_words |
|
) |
| |
Write a block of words to eeprom.
Writes a block of words to EEPROM at the requested address, erasing if necessary, and locking afterwards. Only wordwise writing is safe for writing any value
- Parameters
-
[in] | address | must point to EEPROM space, no checking! |
[in] | data | pointer to data to write |
[in] | length_in_words | size of of data in WORDS! |
Definition at line 150 of file flash_common_l01.c.
References flash_lock_pecr(), FLASH_PECR, FLASH_SR, FLASH_SR_BSY, flash_unlock_pecr(), and MMIO32.
◆ flash_64bit_disable()
void flash_64bit_disable |
( |
void |
| ) |
|
Enable 32 Bit Programming Mode.
This mode is a low power mode. It must be used at low frequencies and does not allow prefetch or wait states to be used.
Definition at line 69 of file flash.c.
References FLASH_ACR.
◆ flash_64bit_enable()
void flash_64bit_enable |
( |
void |
| ) |
|
◆ flash_erase_page()
void flash_erase_page |
( |
uint32_t |
page_address | ) |
|
◆ flash_lock_option_bytes()
void flash_lock_option_bytes |
( |
void |
| ) |
|
◆ flash_lock_pecr()
void flash_lock_pecr |
( |
void |
| ) |
|
◆ flash_lock_progmem()
void flash_lock_progmem |
( |
void |
| ) |
|
◆ flash_program_half_page()
void flash_program_half_page |
( |
uint32_t * |
dst, |
|
|
void * |
buf |
|
) |
| |
◆ flash_unlock_acr()
void flash_unlock_acr |
( |
void |
| ) |
|
◆ flash_unlock_pecr()
void flash_unlock_pecr |
( |
void |
| ) |
|
◆ flash_unlock_progmem()
void flash_unlock_progmem |
( |
void |
| ) |
|