55 volatile const void *pBase,
117__attribute__((__section__(
".RamFunc")))
120 const uint32_t *pData
158 volatile const void *pDest,
164 uint32_t srcAddr = (uint32_t)pSrc;
165 if ((srcAddr & 3) != 0)
171 uint32_t destAddr = (uint32_t)pDest;
175 const uint32_t *pSrcData;
195 destAddr += nHalfPage,
196 pSrcData += nHalfPage /
sizeof(uint32_t)
200 const uint32_t psw = McciArm_disableInterrupts();
205 McciArm_setPRIMASK(psw);
static uint32_t McciArm_putRegOr(uint32_t reg, uint32_t orVal)
or 32-bit values to a cm0plus register
static uint32_t McciArm_getReg(uint32_t reg)
read a 32-bit value from a cm0plus register
static uint32_t McciArm_putReg(uint32_t reg, uint32_t val)
write a 32-bit value to a cm0plus register
static uint32_t McciArm_putRegClear(uint32_t reg, uint32_t clearVal)
clear out 32-bit values to a cm0plus register
McciBootloaderPlatform_SystemFlashEraseFn_t McciBootloader_Stm32L0_systemFlashErase
McciBootloaderPlatform_SystemFlashWriteFn_t McciBootloader_Stm32L0_systemFlashWrite
#define MCCI_STM32L0_REG_FLASH_PECR
Flash program and erase control register.
#define MCCI_STM32L0_REG_FLASH_PRGKEYR_UNLOCK2
unlock word 2 for PRGKEYR
#define MCCI_STM32L0_REG_FLASH_PEKEYR_UNLOCK2
unlock word 2 for PECR
#define MCCI_STM32L0_REG_FLASH_PECR_FPRG
Enable half-page programming mode.
#define MCCI_STM32L0_REG_FLASH_SR_EOP
End of program.
#define MCCI_STM32L0_REG_FLASH_PRGKEYR
Flash program/erase key register.
#define MCCI_STM32L0_REG_FLASH_PEKEYR
Flash PECR unlock key register.
#define MCCI_STM32L0_REG_FLASH_SR
Flash status register.
#define MCCI_STM32L0_REG_FLASH_PRGKEYR_UNLOCK1
unlock word 1 for PRGKEYR
#define MCCI_STM32L0_FLASH_HALF_PAGE_SIZE
size in bytes of a half-page
#define MCCI_STM32L0_REG_FLASH_PEKEYR_UNLOCK1
unlock word 1 for PECR
#define MCCI_STM32L0_REG_FLASH_PECR_PROG
Select program memory.
#define MCCI_STM32L0_REG_FLASH_SR_BSY
Busy doing write/erase.
#define MCCI_STM32L0_FLASH_PAGE_SIZE
size in bytes of a page
#define MCCI_STM32L0_REG_FLASH_PECR_ERASE
Erase operation requested/not requested.
#define MCCI_STM32L0_REG_FLASH_PECR_PELOCK
Lock the FLASH_PECR register.
bool McciBootloader_Stm32L0_programHalfPage(uint32_t flash_addr, const uint32_t *pData)