Blame | Last modification | View Log | Download | RSS feed
ifndef __stm8lflashinc ; avoid multiple inclusion__stm8lflashinc equ 1savelisting off ; no listing over this file;****************************************************************************;* *;* AS 1.42 - File FLASH.INC *;* *;* contains SFR and Bit Definitions for STM8L Flash Controller *;* *;****************************************************************************__defflash macro BaseFLASH_CR1 label Base+$00 ; Flash control register 1EEPM bit FLASH_CR1,3 ; Flash program and data EEPROM IDDQ mode selectionWAITM bit FLASH_CR1,2 ; Flash program and data EEPROM IDDQ mode during wait modeIE bit FLASH_CR1,1 ; Flash Interrupt enableFIX bit FLASH_CR1,0 ; Fixed Byte programming timeFLASH_CR2 label Base+$01 ; Flash control register 2OPT bit FLASH_CR2,7 ; Write option bytesWPRG bit FLASH_CR2,6 ; Word programmingERASE bit FLASH_CR2,5 ; Block erasingFPRG bit FLASH_CR2,4 ; Fast block programmingPRG bit FLASH_CR2,0 ; Standard block programmingFLASH_PUKR label Base+$02 ; Flash Program memory unprotection registerPUK bfield FLASH_IAPSR,0,8 ; Main program memory unlock keysFLASH_DUKR label Base+$03 ; Data EEPROM unprotection registerDUK bfield FLASH_DUKR,0,8 ; Data EEPROM write unlock keysFLASH_IAPSR label Base+$04 ; Flash in-application programming status registerHVOFF bit FLASH_IAPSR,6 ; End of high voltage flagDUL bit FLASH_IAPSR,3 ; Data EEPROM area unlocked flagEOP bit FLASH_IAPSR,2 ; End of programming (write or erase operation) flagPUL bit FLASH_IAPSR,1 ; Flash Program memory unlocked flagWR_PG_DIS bit FLASH_IAPSR,0 ; Write attempted to protected page flagendmrestoreendif ; __stm8lflashinc