Lines Matching +full:programming +full:- +full:enable
6 * SPDX-License-Identifier: Apache-2.0
35 #define FLASH_ERASED_VALUE ((flash_prg_t)-1)
50 return !!(regs->CR & FLASH_CR_LOCK); in is_flash_locked()
55 regs->CR |= FLASH_CR_PG; in write_enable()
60 regs->CR &= (~FLASH_CR_PG); in write_disable()
66 regs->CR |= FLASH_CR_PER; in erase_page_begin()
67 regs->AR = FLASH_STM32_BASE_ADDRESS + page * FLASH_PAGE_SIZE; in erase_page_begin()
72 regs->CR |= FLASH_CR_STRT; in erase_page_begin()
77 regs->CR &= ~FLASH_CR_PER; in erase_page_end()
84 return !!(regs->PECR & FLASH_PECR_PRGLOCK); in is_flash_locked()
89 /* Only used for half-page programming on L1x */ in write_enable()
91 regs->PECR |= FLASH_PECR_PROG; in write_enable()
98 regs->PECR &= ~FLASH_PECR_PROG; in write_disable()
105 /* Enable programming in erase mode. An erase is triggered by in erase_page_begin()
108 regs->PECR |= FLASH_PECR_ERASE; in erase_page_begin()
109 regs->PECR |= FLASH_PECR_PROG; in erase_page_begin()
118 /* Disable programming */ in erase_page_end()
119 regs->PECR &= ~FLASH_PECR_PROG; in erase_page_end()
120 regs->PECR &= ~FLASH_PECR_ERASE; in erase_page_end()
135 return -EIO; in write_value()
147 return -EIO; in write_value()
150 /* Enable writing */ in write_value()
178 return -EIO; in flash_stm32_block_erase_loop()
187 for (i = get_page(offset); i <= get_page(offset + len - 1); ++i) { in flash_stm32_block_erase_loop()